PythonQt.QtGui.QTextLine
QTextLine
PythonQtInstanceWrapper object
Native bases: PythonQtInstanceWrapper
Supplemental documentation: Qt 5 reference:
Detailed Description
A text line is usually created by QTextLayout::createLine().
After being created, the line can be filled using the setLineWidth() or setNumColumns() functions. A line has a number of attributes including the rectangle it occupies, rect(), its coordinates, x() and y(), its textLength(), width() and naturalTextWidth(), and its ascent() and descent() relative to the text. The position of the cursor in terms of the line is available from cursorToX() and its inverse from xToCursor(). A line can be moved with setPosition().
Source: https://doc.qt.io/archives/qt-5.15/qtextline.html
Complete member index
Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.
| Member | Kind | Signature | Summary |
|---|---|---|---|
CursorBetweenCharacters |
attribute | Any |
|
CursorOnCharacter |
attribute | Any |
|
CursorPosition |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. |
Edge |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
Leading |
attribute | Any |
|
Trailing |
attribute | Any |
|
__init__ |
function | (self, *args: Any, **kwargs: Any) -> None |
Native constructor; consult class documentation for supported overloads. (shared captured text) |
ascent |
function | (self) -> float |
X.ascent() -> float |
className |
function | (self, *args: Any, **kwargs: Any) -> Any |
Return the classname of the object (shared captured text) |
cursorToX |
function | (self, cursorPos: int, edge: Any) -> float |
X.cursorToX(cursorPos, edge) -> float |
delete |
function | (self, *args: Any, **kwargs: Any) -> Any |
Deletes the C++ object (at your own risk, my friend!) (shared captured text) |
descent |
function | (self) -> float |
X.descent() -> float |
draw |
function | (self, p: Any, point: Any, selection: Any) -> None |
X.draw(p, point, selection) |
glyphRuns |
function | (self, *args: Any, **kwargs: Any) -> Any |
X.glyphRuns(from, length) -> tuple |
height |
function | (self) -> float |
X.height() -> float |
help |
function | (self, *args: Any, **kwargs: Any) -> Any |
Shows the help of available methods for this class (shared captured text) |
horizontalAdvance |
function | (self) -> float |
X.horizontalAdvance() -> float |
inherits |
function | (self, *args: Any, **kwargs: Any) -> Any |
Returns if the class inherits or is of given type name (shared captured text) |
isValid |
function | (self) -> bool |
X.isValid() -> bool |
leading |
function | (self) -> float |
X.leading() -> float |
leadingIncluded |
function | (self) -> bool |
X.leadingIncluded() -> bool |
lineNumber |
function | (self) -> int |
X.lineNumber() -> int |
naturalTextRect |
function | (self) -> Any |
X.naturalTextRect() -> PythonQt.QtCore.QRectF |
naturalTextWidth |
function | (self) -> float |
X.naturalTextWidth() -> float |
position |
function | (self) -> Any |
X.position() -> PythonQt.QtCore.QPointF |
rect |
function | (self) -> Any |
X.rect() -> PythonQt.QtCore.QRectF |
setLeadingIncluded |
function | (self, included: bool) -> None |
Includes positive leading into the line's height if included is true; otherwise does not include leading. |
setLineWidth |
function | (self, width: float) -> None |
Lays out the line with the given width. |
setNumColumns |
function | (self, columns: int, alignmentWidth: Any) -> None |
X.setNumColumns(columns, alignmentWidth) |
setPosition |
function | (self, pos: Any) -> None |
Moves the line to position pos. |
textLength |
function | (self) -> int |
X.textLength() -> int |
textStart |
function | (self) -> int |
X.textStart() -> int |
width |
function | (self) -> float |
X.width() -> float |
x |
function | (self) -> float |
X.x() -> float |
xToCursor |
function | (self, x: float, arg__2: Any) -> int |
X.xToCursor(x, arg__2) -> int |
y |
function | (self) -> float |
X.y() -> float |