Skip to content

PythonQt.QtCore.QPointF

QPointF

PythonQtInstanceWrapper object

Native bases: PythonQtInstanceWrapper

Supplemental documentation: Qt 5 reference:

Detailed Description

A point is specified by a x coordinate and an y coordinate which can be accessed using the x() and y() functions. The coordinates of the point are specified using floating point numbers for accuracy. The isNull() function returns true if both x and y are set to 0.0. The coordinates can be set (or altered) using the setX() and setY() functions, or alternatively the rx() and ry() functions which return references to the coordinates (allowing direct manipulation).

Given a point p, the following statements are all equivalent:

QPointF p;

p.setX(p.x() + 1.0);
p += QPointF(1.0, 0.0);
p.rx()++;

A QPointF object can also be used as a vector: Addition and subtraction are defined as for vectors (each component is added separately). A QPointF object can also be divided or multiplied by an int or a qreal.

In addition, the QPointF class provides a constructor converting a QPoint object into a QPointF object, and a corresponding toPoint() function which returns a QPoint copy of this point. Finally, QPointF objects can be streamed as well as compared.

Source: https://doc.qt.io/archives/qt-5.15/qpointf.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)
dotProduct function (self, p1: Any, p2: Any) -> float X.dotProduct(p1, p2) -> float
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
manhattanLength function (self) -> float X.manhattanLength() -> float
readFrom function (self, arg__1: Any) -> Any (shared captured text)
setX function (self, x: float) -> None Sets the x coordinate of this point to the given x coordinate.
setY function (self, y: float) -> None Sets the y coordinate of this point to the given y coordinate.
toPoint function (self) -> Any X.toPoint() -> PythonQt.QtCore.QPoint
writeTo function (self, arg__1: Any) -> Any (shared captured text)
x function (self) -> float X.x() -> float
y function (self) -> float X.y() -> float