This is how I change the font:
self.text = QTextEdit(self)
self.text.move(100,100)
font = QFont()
font.setFamily(u"Arial")
font.setBold(True)
font.setWeight(75)
self.text.setFont(font)
What this does is turn the text into Arial, and makes it bold. To make it italic, try this:
font = QFont()
font.setFamily(u"Arial")
font.setItalic(True)
And for underline, you can do:
font = QFont()
font.setFamily(u"Arial")
font.setUnderline(True)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…