PythonQt.QtCore.QLineF · declarations 001
Back to PythonQt.QtCore.QLineF
BoundedIntersection
instance-attribute
BoundedIntersection: Any
IntersectType
instance-attribute
IntersectType: 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
NoIntersection
instance-attribute
NoIntersection: Any
UnboundedIntersection
instance-attribute
UnboundedIntersection: Any
angle
angle(l: Any) -> float
X.angle(l) -> float
Supplemental documentation: Qt 5 reference:
qreal QLineF::angle() const
Returns the angle of the line in degrees.
The return value will be in the range of values from 0.0 up to but not including 360.0. The angles are measured counter-clockwise from a point on the x-axis to the right of the origin (x > 0).
This function was introduced in Qt 4.4.
See also setAngle().
Upstream PySide2 reference signatures (binding differences may apply):
angle(self) -> float
angle(self, l: PySide2.QtCore.QLineF) -> float
Source: https://doc.qt.io/archives/qt-5.15/qlinef.html#angle
angleTo
angleTo(l: Any) -> float
X.angleTo(l) -> float
Supplemental documentation: Qt 5 reference:
qreal QLineF::angleTo(const QLineF \&line) const
Returns the angle (in degrees) from this line to the given line, taking the direction of the lines into account. If the lines do not intersect within their range, it is the intersection point of the extended lines that serves as origin (see QLineF::UnboundedIntersection).
The returned value represents the number of degrees you need to add to this line to make it have the same angle as the given line, going counter-clockwise.
This function was introduced in Qt 4.4.
See also intersect().
Upstream PySide2 reference signatures (binding differences may apply):
angleTo(self, l: PySide2.QtCore.QLineF) -> float
Source: https://doc.qt.io/archives/qt-5.15/qlinef.html#angleTo
dx
dx() -> float
X.dx() -> float
Supplemental documentation: Qt 5 reference:
qreal QLineF::dx() const
Returns the horizontal component of the line's vector.
Upstream PySide2 reference signatures (binding differences may apply):
dx(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qlinef.html#dx
dy
dy() -> float
X.dy() -> float
Supplemental documentation: Qt 5 reference:
qreal QLineF::dy() const
Returns the vertical component of the line's vector.
Upstream PySide2 reference signatures (binding differences may apply):
dy(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qlinef.html#dy
fromPolar
fromPolar(length: float, angle: float) -> Any
X.fromPolar(length, angle) -> PythonQt.QtCore.QLineF
Supplemental documentation: Qt 5 reference:
[static] QLineF QLineF::fromPolar(qreal length, qreal angle)
Returns a QLineF with the given length and angle.
The first point of the line will be on the origin.
Positive values for the angles mean counter-clockwise while negative values mean the clockwise direction. Zero degrees is at the 3 o'clock position.
This function was introduced in Qt 4.4.
Upstream PySide2 reference signatures (binding differences may apply):
fromPolar(length: float, angle: float) -> PySide2.QtCore.QLineF
Source: https://doc.qt.io/archives/qt-5.15/qlinef.html#fromPolar
intersect
intersect(l: Any, intersectionPoint: Any) -> Any
X.intersect(l, intersectionPoint)
Upstream PySide2 reference signatures (binding differences may apply):
intersect(self, l: PySide2.QtCore.QLineF, intersectionPoint: PySide2.QtCore.QPointF) -> PySide2.QtCore.QLineF.IntersectType
Source: https://doc.qt.io/archives/qt-5.15/qlinef.html#intersect
isNull
isNull() -> bool
X.isNull() -> bool
Supplemental documentation: Qt 5 reference:
bool QLineF::isNull() const
Returns true if the line does not have distinct start and end points; otherwise
returns false. The start and end points are considered distinct if
qFuzzyCompare() can
distinguish them in at least one coordinate.
Note: Due to the use of fuzzy comparison, isNull() may return true for lines whose
length() is not zero.
See also qFuzzyCompare() and length().
Upstream PySide2 reference signatures (binding differences may apply):
isNull(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qlinef.html#isNull
length
length() -> float
X.length() -> float
Supplemental documentation: Qt 5 reference:
qreal QLineF::length() const
Returns the length of the line.
See also setLength() and isNull().
Upstream PySide2 reference signatures (binding differences may apply):
length(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qlinef.html#length
normalVector
normalVector() -> Any
X.normalVector() -> PythonQt.QtCore.QLineF
Supplemental documentation: Qt 5 reference:
QLineF QLineF::normalVector() const
Returns a line that is perpendicular to this line with the same starting point and length.

See also unitVector().
Upstream PySide2 reference signatures (binding differences may apply):
normalVector(self) -> PySide2.QtCore.QLineF
Source: https://doc.qt.io/archives/qt-5.15/qlinef.html#normalVector
p1
p1() -> Any
X.p1() -> PythonQt.QtCore.QPointF
Supplemental documentation: Qt 5 reference:
QPointF QLineF::p1() const
Returns the line's start point.
See also setP1(), x1(), y1(), and p2().
Upstream PySide2 reference signatures (binding differences may apply):
p1(self) -> PySide2.QtCore.QPointF
Source: https://doc.qt.io/archives/qt-5.15/qlinef.html#p1
p2
p2() -> Any
X.p2() -> PythonQt.QtCore.QPointF
Supplemental documentation: Qt 5 reference:
QPointF QLineF::p2() const
Returns the line's end point.
See also setP2(), x2(), y2(), and p1().
Upstream PySide2 reference signatures (binding differences may apply):
p2(self) -> PySide2.QtCore.QPointF
Source: https://doc.qt.io/archives/qt-5.15/qlinef.html#p2
pointAt
pointAt(t: float) -> Any
X.pointAt(t) -> PythonQt.QtCore.QPointF
Supplemental documentation: Qt 5 reference:
QPointF QLineF::pointAt(qreal t) const
Returns the point at the parameterized position specified by t. The function returns the line's start point if t \= 0, and its end point if t \= 1.
Upstream PySide2 reference signatures (binding differences may apply):
pointAt(self, t: float) -> PySide2.QtCore.QPointF
Source: https://doc.qt.io/archives/qt-5.15/qlinef.html#pointAt
setAngle
setAngle(angle: float) -> None
X.setAngle(angle)
Supplemental documentation: Qt 5 reference:
void QLineF::setAngle(qreal angle)
Sets the angle of the line to the given angle (in degrees). This will change the position of the second point of the line such that the line has the given angle.
Positive values for the angles mean counter-clockwise while negative values mean the clockwise direction. Zero degrees is at the 3 o'clock position.
This function was introduced in Qt 4.4.
See also angle().
Upstream PySide2 reference signatures (binding differences may apply):
setAngle(self, angle: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlinef.html#setAngle
setLength
setLength(len: float) -> None
X.setLength(len)
Supplemental documentation: Qt 5 reference:
void QLineF::setLength(qreal length)
Sets the length of the line to the given length. QLineF will move the end point - p2() - of the line to give the line its new length, unless length() was previously zero, in which case no scaling is attempted. For lines with very short lengths (represented by denormal floating-point values), results may be imprecise.
See also length() and unitVector().
Upstream PySide2 reference signatures (binding differences may apply):
setLength(self, len: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlinef.html#setLength
setLine
setLine(x1: float, y1: float, x2: float, y2: float) -> None
X.setLine(x1, y1, x2, y2)
Supplemental documentation: Qt 5 reference:
void QLineF::setLine(qreal x1, qreal y1, qreal x2, qreal y2)
Sets this line to the start in x1, y1 and end in x2, y2.
This function was introduced in Qt 4.4.
See also setP1(), setP2(), p1(), and p2().
Upstream PySide2 reference signatures (binding differences may apply):
setLine(self, x1: float, y1: float, x2: float, y2: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlinef.html#setLine
setP1
setP1(p1: Any) -> None
X.setP1(p1)
Supplemental documentation: Qt 5 reference:
void QLineF::setP1(const QPointF \&p1)
Sets the starting point of this line to p1.
This function was introduced in Qt 4.4.
Upstream PySide2 reference signatures (binding differences may apply):
setP1(self, p1: PySide2.QtCore.QPointF) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlinef.html#setP1
setP2
setP2(p2: Any) -> None
X.setP2(p2)
Supplemental documentation: Qt 5 reference:
void QLineF::setP2(const QPointF \&p2)
Sets the end point of this line to p2.
This function was introduced in Qt 4.4.
Upstream PySide2 reference signatures (binding differences may apply):
setP2(self, p2: PySide2.QtCore.QPointF) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlinef.html#setP2
setPoints
setPoints(p1: Any, p2: Any) -> None
X.setPoints(p1, p2)
Supplemental documentation: Qt 5 reference:
void QLineF::setPoints(const QPointF \&p1, const QPointF \&p2)
Sets the start point of this line to p1 and the end point of this line to p2.
This function was introduced in Qt 4.4.
See also setP1(), setP2(), p1(), and p2().
Upstream PySide2 reference signatures (binding differences may apply):
setPoints(self, p1: PySide2.QtCore.QPointF, p2: PySide2.QtCore.QPointF) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlinef.html#setPoints
toLine
toLine() -> Any
X.toLine() -> PythonQt.QtCore.QLine
Supplemental documentation: Qt 5 reference:
QLine QLineF::toLine() const
Returns an integer based copy of this line.
Note that the returned line's start and end points are rounded to the nearest integer.
See also QLineF().
Upstream PySide2 reference signatures (binding differences may apply):
toLine(self) -> PySide2.QtCore.QLine
Source: https://doc.qt.io/archives/qt-5.15/qlinef.html#toLine
translate
translate(dx: Any, dy: Any) -> None
X.translate(dx, dy)
Supplemental documentation: Qt 5 reference:
void QLineF::translate(const QPointF \&offset)
Translates this line by the given offset.
void QLineF::translate(qreal dx, qreal dy)
This is an overloaded function.
Translates this line the distance specified by dx and dy.
Upstream PySide2 reference signatures (binding differences may apply):
translate(self, dx: float, dy: float) -> None
translate(self, p: PySide2.QtCore.QPointF) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlinef.html#translate
translated
translated(dx: Any, dy: Any) -> Any
X.translated(dx, dy) -> PythonQt.QtCore.QLineF
Supplemental documentation: Qt 5 reference:
QLineF QLineF::translated(const QPointF \&offset) const
Returns this line translated by the given offset.
This function was introduced in Qt 4.4.
QLineF QLineF::translated(qreal dx, qreal dy) const
This is an overloaded function.
Returns this line translated the distance specified by dx and dy.
This function was introduced in Qt 4.4.
Upstream PySide2 reference signatures (binding differences may apply):
translated(self, dx: float, dy: float) -> PySide2.QtCore.QLineF
translated(self, p: PySide2.QtCore.QPointF) -> PySide2.QtCore.QLineF
Source: https://doc.qt.io/archives/qt-5.15/qlinef.html#translated
unitVector
unitVector() -> Any
X.unitVector() -> PythonQt.QtCore.QLineF
Supplemental documentation: Qt 5 reference:
QLineF QLineF::unitVector() const
Returns the unit vector for this line, i.e a line starting at the same point as this line with a length of 1.0, provided the line is non-null.
See also normalVector() and setLength().
Upstream PySide2 reference signatures (binding differences may apply):
unitVector(self) -> PySide2.QtCore.QLineF
Source: https://doc.qt.io/archives/qt-5.15/qlinef.html#unitVector
x1
x1() -> float
x2
x2() -> float
y1
y1() -> float
y2
y2() -> float