Skip to content

PythonQt.Qt.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 (shared captured text)
CursorOnCharacter attribute Any (shared captured text)
CursorPosition attribute type Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text)
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 (shared captured text)
Trailing attribute Any (shared captured text)
__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 (shared captured text)
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 (shared captured text)
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 (shared captured text)
draw function (self, p: Any, point: Any, selection: Any) -> None X.draw(p, point, selection) (shared captured text)
glyphRuns function (self, *args: Any, **kwargs: Any) -> Any X.glyphRuns(from, length) -> tuple (shared captured text)
height function (self) -> float X.height() -> float (shared captured text)
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 (shared captured text)
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 (shared captured text)
leading function (self) -> float X.leading() -> float (shared captured text)
leadingIncluded function (self) -> bool X.leadingIncluded() -> bool (shared captured text)
lineNumber function (self) -> int X.lineNumber() -> int (shared captured text)
naturalTextRect function (self) -> Any X.naturalTextRect() -> PythonQt.QtCore.QRectF (shared captured text)
naturalTextWidth function (self) -> float X.naturalTextWidth() -> float (shared captured text)
position function (self) -> Any X.position() -> PythonQt.QtCore.QPointF (shared captured text)
rect function (self) -> Any X.rect() -> PythonQt.QtCore.QRectF (shared captured text)
setLeadingIncluded function (self, included: bool) -> None Includes positive leading into the line's height if included is true; otherwise does not include leading. (shared captured text)
setLineWidth function (self, width: float) -> None Lays out the line with the given width. (shared captured text)
setNumColumns function (self, columns: int, alignmentWidth: Any) -> None X.setNumColumns(columns, alignmentWidth) (shared captured text)
setPosition function (self, pos: Any) -> None Moves the line to position pos. (shared captured text)
textLength function (self) -> int X.textLength() -> int (shared captured text)
textStart function (self) -> int X.textStart() -> int (shared captured text)
width function (self) -> float X.width() -> float (shared captured text)
x function (self) -> float X.x() -> float (shared captured text)
xToCursor function (self, x: float, arg__2: Any) -> int X.xToCursor(x, arg__2) -> int (shared captured text)
y function (self) -> float X.y() -> float (shared captured text)