PythonQt.QtGui.QTextFragment · declarations 001
Back to PythonQt.QtGui.QTextFragment
charFormat
charFormat() -> Any
X.charFormat() -> PythonQt.QtGui.QTextCharFormat
Supplemental documentation: Qt 5 reference:
QTextCharFormat QTextFragment::charFormat() const
Returns the text fragment's character format.
See also text().
Upstream PySide2 reference signatures (binding differences may apply):
charFormat(self) -> PySide2.QtGui.QTextCharFormat
Source: https://doc.qt.io/archives/qt-5.15/qtextfragment.html#charFormat
charFormatIndex
charFormatIndex() -> int
X.charFormatIndex() -> int
Supplemental documentation: Qt 5 reference:
int QTextFragment::charFormatIndex() const
Returns an index into the document's internal list of character formats for the text fragment's character format.
See also QTextDocument::allFormats().
Upstream PySide2 reference signatures (binding differences may apply):
charFormatIndex(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qtextfragment.html#charFormatIndex
contains
contains(position: int) -> bool
X.contains(position) -> bool
Supplemental documentation: Qt 5 reference:
bool QTextFragment::contains(int position) const
Returns true if the text fragment contains the text at the given position in the
document; otherwise returns false.
Upstream PySide2 reference signatures (binding differences may apply):
contains(self, position: int) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qtextfragment.html#contains
glyphRuns
glyphRuns(*args: Any, **kwargs: Any) -> Any
X.glyphRuns(from, length) -> tuple
Supplemental documentation: Qt 5 reference:
QList\<QGlyphRun> QTextFragment::glyphRuns(int pos \= -1, int len \= -1) const
Returns the glyphs corresponding to len characters of this text fragment starting at position pos. The positions of the glyphs are relative to the position of the QTextBlock's layout.
If pos is less than zero, it will default to the start of the QTextFragment. If len is less than zero, it will default to the length of the fragment.
See also QGlyphRun, QTextBlock::layout(), QTextLayout::position(), and QPainter::drawGlyphRun().
Source: https://doc.qt.io/archives/qt-5.15/qtextfragment.html#glyphRuns
isValid
isValid() -> bool
X.isValid() -> bool
Supplemental documentation: Qt 5 reference:
bool QTextFragment::isValid() const
Returns true if this is a valid text fragment (i.e. has a valid position in a
document); otherwise returns false.
Upstream PySide2 reference signatures (binding differences may apply):
isValid(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qtextfragment.html#isValid
length
length() -> int
X.length() -> int
Supplemental documentation: Qt 5 reference:
int QTextFragment::length() const
Returns the number of characters in the text fragment.
See also text().
Upstream PySide2 reference signatures (binding differences may apply):
length(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qtextfragment.html#length
position
position() -> int
X.position() -> int
Supplemental documentation: Qt 5 reference:
int QTextFragment::position() const
Returns the position of this text fragment in the document.
Upstream PySide2 reference signatures (binding differences may apply):
position(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qtextfragment.html#position
text
text() -> str
X.text() -> str
Supplemental documentation: Qt 5 reference:
QString QTextFragment::text() const
Returns the text fragment's as plain text.
See also length() and charFormat().
Upstream PySide2 reference signatures (binding differences may apply):
text(self) -> str
Source: https://doc.qt.io/archives/qt-5.15/qtextfragment.html#text