Skip to content

PythonQt.Qt.QLine

QLine

PythonQtInstanceWrapper object

Native bases: PythonQtInstanceWrapper

Supplemental documentation: Qt 5 reference:

Detailed Description

A QLine describes a finite length line (or a line segment) on a two-dimensional surface. The start and end points of the line are specified using integer point accuracy for coordinates. Use the QLineF constructor to retrieve a floating point copy.

The positions of the line's start and end points can be retrieved using the p1(), x1(), y1(), p2(), x2(), and y2() functions. The dx() and dy() functions return the horizontal and vertical components of the line. Use isNull() to determine whether the QLine represents a valid line or a null line.

Finally, the line can be translated a given offset using the translate() function.

Source: https://doc.qt.io/archives/qt-5.15/qline.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
__init__ function (self, *args: Any, **kwargs: Any) -> None Native constructor; consult class documentation for supported overloads. (shared captured text)
className function (self, *args: Any, **kwargs: Any) -> Any Return the classname of the object (shared captured text)
delete function (self, *args: Any, **kwargs: Any) -> Any Deletes the C++ object (at your own risk, my friend!) (shared captured text)
dx function (self) -> int X.dx() -> int (shared captured text)
dy function (self) -> int X.dy() -> int (shared captured text)
help function (self, *args: Any, **kwargs: Any) -> Any Shows the help of available methods for this class (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)
isNull function (self) -> bool X.isNull() -> bool (shared captured text)
p1 function (self) -> Any X.p1() -> PythonQt.QtCore.QPoint (shared captured text)
p2 function (self) -> Any X.p2() -> PythonQt.QtCore.QPoint (shared captured text)
readFrom function (self, arg__1: Any) -> Any (shared captured text)
setLine function (self, x1: int, y1: int, x2: int, y2: int) -> None X.setLine(x1, y1, x2, y2) (shared captured text)
setP1 function (self, p1: Any) -> None Sets the starting point of this line to p1. (shared captured text)
setP2 function (self, p2: Any) -> None Sets the end point of this line to p2. (shared captured text)
setPoints function (self, p1: Any, p2: Any) -> None X.setPoints(p1, p2) (shared captured text)
translate function (self, dx: Any, dy: Any) -> None X.translate(dx, dy) (shared captured text)
translated function (self, dx: Any, dy: Any) -> Any X.translated(dx, dy) -> PythonQt.QtCore.QLine (shared captured text)
writeTo function (self, arg__1: Any) -> Any (shared captured text)
x1 function (self) -> int X.x1() -> int (shared captured text)
x2 function (self) -> int X.x2() -> int (shared captured text)
y1 function (self) -> int X.y1() -> int (shared captured text)
y2 function (self) -> int X.y2() -> int (shared captured text)