PythonQt.QtGui.QStaticText · declarations 001
Back to PythonQt.QtGui.QStaticText
AggressiveCaching
instance-attribute
AggressiveCaching: Any
ModerateCaching
instance-attribute
ModerateCaching: Any
PerformanceHint
instance-attribute
PerformanceHint: type
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
operator_assign
operator_assign(arg__1: Any) -> Any
X.operator_assign(arg__1) -> PythonQt.QtGui.QStaticText
performanceHint
performanceHint() -> Any
X.performanceHint()
Supplemental documentation: Qt 5 reference:
QStaticText::PerformanceHint QStaticText::performanceHint() const
Returns which performance hint is set for the QStaticText.
See also setPerformanceHint().
Upstream PySide2 reference signatures (binding differences may apply):
performanceHint(self) -> PySide2.QtGui.QStaticText.PerformanceHint
Source: https://doc.qt.io/archives/qt-5.15/qstatictext.html#performanceHint
prepare
prepare(matrix: Any, font: Any) -> None
X.prepare(matrix, font)
Supplemental documentation: Qt 5 reference:
void QStaticText::prepare(const QTransform \&matrix \= QTransform(), const QFont \&font \= QFont())
Prepares the QStaticText object for being painted with the given matrix and the given font to avoid overhead when the actual drawStaticText() call is made.
When drawStaticText() is called, the layout of the QStaticText will be recalculated if any part of the QStaticText object has changed since the last time it was drawn. It will also be recalculated if the painter's font is not the same as when the QStaticText was last drawn, or, on any other paint engine than the OpenGL2 engine, if the painter's matrix has been altered since the static text was last drawn.
To avoid the overhead of creating the layout the first time you draw the QStaticText after making changes, you can use the prepare() function and pass in the matrix and font you expect to use when drawing the text.
See also QPainter::setFont() and QPainter::setMatrix().
Upstream PySide2 reference signatures (binding differences may apply):
prepare(self, matrix: PySide2.QtGui.QTransform=..., font: PySide2.QtGui.QFont=...) -> None
Source: https://doc.qt.io/archives/qt-5.15/qstatictext.html#prepare
setPerformanceHint
setPerformanceHint(performanceHint: Any) -> None
X.setPerformanceHint(performanceHint)
Supplemental documentation: Qt 5 reference:
void QStaticText::setPerformanceHint(QStaticText::PerformanceHint performanceHint)
Sets the performance hint of the QStaticText according to the performanceHint provided. The performanceHint is used to customize how much caching is done internally to improve performance.
The default is QStaticText::ModerateCaching.
Note: This function will cause the layout of the text to require recalculation.
See also performanceHint().
Upstream PySide2 reference signatures (binding differences may apply):
setPerformanceHint(self, performanceHint: PySide2.QtGui.QStaticText.PerformanceHint) -> None
Source: https://doc.qt.io/archives/qt-5.15/qstatictext.html#setPerformanceHint
setText
setText(text: str) -> None
X.setText(text)
Supplemental documentation: Qt 5 reference:
void QStaticText::setText(const QString \&text)
Sets the text of the QStaticText to text.
Note: This function will cause the layout of the text to require recalculation.
See also text().
Upstream PySide2 reference signatures (binding differences may apply):
setText(self, text: str) -> None
Source: https://doc.qt.io/archives/qt-5.15/qstatictext.html#setText
setTextFormat
setTextFormat(textFormat: Any) -> None
X.setTextFormat(textFormat)
Supplemental documentation: Qt 5 reference:
void QStaticText::setTextFormat(Qt::TextFormat textFormat)
Sets the text format of the QStaticText to textFormat. If textFormat is set to Qt::AutoText (the default), the format of the text will try to be determined using the function Qt::mightBeRichText(). If the text format is Qt::PlainText, then the text will be displayed as is, whereas it will be interpreted as HTML if the format is Qt::RichText. HTML tags that alter the font of the text, its color, or its layout are supported by QStaticText.
Note: This function will cause the layout of the text to require recalculation.
See also textFormat(), setText(), and text().
Upstream PySide2 reference signatures (binding differences may apply):
setTextFormat(self, textFormat: PySide2.QtCore.Qt.TextFormat) -> None
Source: https://doc.qt.io/archives/qt-5.15/qstatictext.html#setTextFormat
setTextOption
setTextOption(textOption: Any) -> None
X.setTextOption(textOption)
Supplemental documentation: Qt 5 reference:
void QStaticText::setTextOption(const QTextOption \&textOption)
Sets the text option structure that controls the layout process to the given textOption.
See also textOption().
Upstream PySide2 reference signatures (binding differences may apply):
setTextOption(self, textOption: PySide2.QtGui.QTextOption) -> None
Source: https://doc.qt.io/archives/qt-5.15/qstatictext.html#setTextOption
setTextWidth
setTextWidth(textWidth: float) -> None
X.setTextWidth(textWidth)
Supplemental documentation: Qt 5 reference:
void QStaticText::setTextWidth(qreal textWidth)
Sets the preferred width for this QStaticText. If the text is wider than the specified width, it will be broken into multiple lines and grow vertically. If the text cannot be split into multiple lines, it will be larger than the specified textWidth.
Setting the preferred text width to a negative number will cause the text to be unbounded.
Use size() to get the actual size of the text.
Note: This function will cause the layout of the text to require recalculation.
See also textWidth() and size().
Upstream PySide2 reference signatures (binding differences may apply):
setTextWidth(self, textWidth: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qstatictext.html#setTextWidth
size
size() -> Any
X.size() -> PythonQt.QtCore.QSizeF
Supplemental documentation: Qt 5 reference:
QSizeF QStaticText::size() const
Returns the size of the bounding rect for this QStaticText.
See also textWidth().
Upstream PySide2 reference signatures (binding differences may apply):
size(self) -> PySide2.QtCore.QSizeF
Source: https://doc.qt.io/archives/qt-5.15/qstatictext.html#size
swap
swap(other: Any) -> None
X.swap(other)
Supplemental documentation: Qt 5 reference:
void QStaticText::swap(QStaticText \&other)
Swaps this static text instance with other. This function is very fast and never fails.
This function was introduced in Qt 5.0.
Upstream PySide2 reference signatures (binding differences may apply):
swap(self, other: PySide2.QtGui.QStaticText) -> None
Source: https://doc.qt.io/archives/qt-5.15/qstatictext.html#swap
text
text() -> str
X.text() -> str
Supplemental documentation: Qt 5 reference:
QString QStaticText::text() const
Returns the text of the QStaticText.
See also setText().
Upstream PySide2 reference signatures (binding differences may apply):
text(self) -> str
Source: https://doc.qt.io/archives/qt-5.15/qstatictext.html#text
textFormat
textFormat() -> Any
X.textFormat()
Supplemental documentation: Qt 5 reference:
Qt::TextFormat QStaticText::textFormat() const
Returns the text format of the QStaticText.
See also setTextFormat(), setText(), and text().
Upstream PySide2 reference signatures (binding differences may apply):
textFormat(self) -> PySide2.QtCore.Qt.TextFormat
Source: https://doc.qt.io/archives/qt-5.15/qstatictext.html#textFormat
textOption
textOption() -> Any
X.textOption() -> PythonQt.QtGui.QTextOption
Supplemental documentation: Qt 5 reference:
QTextOption QStaticText::textOption() const
Returns the current text option used to control the layout process.
See also setTextOption().
Upstream PySide2 reference signatures (binding differences may apply):
textOption(self) -> PySide2.QtGui.QTextOption
Source: https://doc.qt.io/archives/qt-5.15/qstatictext.html#textOption
textWidth
textWidth() -> float
X.textWidth() -> float
Supplemental documentation: Qt 5 reference:
qreal QStaticText::textWidth() const
Returns the preferred width for this QStaticText.
See also setTextWidth().
Upstream PySide2 reference signatures (binding differences may apply):
textWidth(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qstatictext.html#textWidth