The PySide.QtGui.QTextItem class provides all the information required to draw text in a custom paint engine.
When you reimplement your own paint engine, you must reimplement QPaintEngine.drawTextItem() , a function that takes a PySide.QtGui.QTextItem as one of its arguments.
Constant | Description |
---|---|
QTextItem.RightToLeft | Render the text from right to left. |
QTextItem.Overline | Paint a line above the text. |
QTextItem.Underline | Paint a line under the text. |
QTextItem.StrikeOut | Paint a line through the text. |
Return type: | PySide.QtCore.qreal |
---|
Corresponds to the PySide.QtGui.QFontMetrics.ascent() of the piece of text that is drawn.
Return type: | PySide.QtCore.qreal |
---|
Corresponds to the PySide.QtGui.QFontMetrics.descent() of the piece of text that is drawn.
Return type: | PySide.QtGui.QFont |
---|
Returns the font that should be used to draw the text.
Return type: | PySide.QtGui.QTextItem.RenderFlags |
---|
Returns the render flags used.
Return type: | unicode |
---|
Returns the text that should be drawn.
Return type: | PySide.QtCore.qreal |
---|
Specifies the total width of the text to be drawn.