PythonQt.QtCore.QPoint
QPoint
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
isNull() function returns
true if both x and y are set to 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:
QPoint p;
p.setX(p.x() + 1);
p += QPoint(1, 0);
p.rx()++;
A QPoint object can also be used as a vector: Addition and subtraction are defined as
for vectors (each component is added separately). A QPoint object can also be divided or
multiplied by an int or a qreal.
In addition, the QPoint class provides the manhattanLength() function which gives an inexpensive approximation of the length of the QPoint object interpreted as a vector. Finally, QPoint objects can be streamed as well as compared.
Source: https://doc.qt.io/archives/qt-5.15/qpoint.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) -> int |
X.dotProduct(p1, p2) -> int |
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) -> int |
X.manhattanLength() -> int |
readFrom |
function | (self, arg__1: Any) -> Any |
(shared captured text) |
setX |
function | (self, x: int) -> None |
Sets the x coordinate of this point to the given x coordinate. |
setY |
function | (self, y: int) -> None |
Sets the y coordinate of this point to the given y coordinate. |
writeTo |
function | (self, arg__1: Any) -> Any |
(shared captured text) |
x |
function | (self) -> int |
X.x() -> int |
y |
function | (self) -> int |
X.y() -> int |