PythonQt.QtCore.QRectF · declarations 001
Back to PythonQt.QtCore.QRectF
adjust
adjust(x1: float, y1: float, x2: float, y2: float) -> None
X.adjust(x1, y1, x2, y2)
Supplemental documentation: Qt 5 reference:
void QRectF::adjust(qreal dx1, qreal dy1, qreal dx2, qreal dy2)
Adds dx1, dy1, dx2 and dy2 respectively to the existing coordinates of the rectangle.
See also adjusted() and setRect().
Upstream PySide2 reference signatures (binding differences may apply):
adjust(self, x1: float, y1: float, x2: float, y2: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#adjust
adjusted
adjusted(x1: float, y1: float, x2: float, y2: float) -> Any
X.adjusted(x1, y1, x2, y2) -> PythonQt.QtCore.QRectF
Supplemental documentation: Qt 5 reference:
QRectF QRectF::adjusted(qreal dx1, qreal dy1, qreal dx2, qreal dy2) const
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of this rectangle.
See also adjust().
Upstream PySide2 reference signatures (binding differences may apply):
adjusted(self, x1: float, y1: float, x2: float, y2: float) -> PySide2.QtCore.QRectF
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#adjusted
bottom
bottom() -> float
X.bottom() -> float
Supplemental documentation: Qt 5 reference:
qreal QRectF::bottom() const
Returns the y-coordinate of the rectangle's bottom edge.
See also setBottom(), bottomLeft(), and bottomRight().
Upstream PySide2 reference signatures (binding differences may apply):
bottom(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#bottom
bottomLeft
bottomLeft() -> Any
X.bottomLeft() -> PythonQt.QtCore.QPointF
Supplemental documentation: Qt 5 reference:
QPointF QRectF::bottomLeft() const
Returns the position of the rectangle's bottom-left corner.
See also setBottomLeft(), bottom(), and left().
Upstream PySide2 reference signatures (binding differences may apply):
bottomLeft(self) -> PySide2.QtCore.QPointF
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#bottomLeft
bottomRight
bottomRight() -> Any
X.bottomRight() -> PythonQt.QtCore.QPointF
Supplemental documentation: Qt 5 reference:
QPointF QRectF::bottomRight() const
Returns the position of the rectangle's bottom-right corner.
See also setBottomRight(), bottom(), and right().
Upstream PySide2 reference signatures (binding differences may apply):
bottomRight(self) -> PySide2.QtCore.QPointF
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#bottomRight
center
center() -> Any
X.center() -> PythonQt.QtCore.QPointF
Supplemental documentation: Qt 5 reference:
QPointF QRectF::center() const
Returns the center point of the rectangle.
See also moveCenter().
Upstream PySide2 reference signatures (binding differences may apply):
center(self) -> PySide2.QtCore.QPointF
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#center
contains
contains(x: Any, y: Any) -> bool
X.contains(x, y) -> bool
Supplemental documentation: Qt 5 reference:
bool QRectF::contains(const QPointF \&point) const
Returns true if the given point is inside or on the edge of the rectangle; otherwise
returns false.
See also intersects().
bool QRectF::contains(const QRectF \&rectangle) const
This is an overloaded function.
Returns true if the given rectangle is inside this rectangle; otherwise returns
false.
bool QRectF::contains(qreal x, qreal y) const
This is an overloaded function.
Returns true if the point (x, y) is inside or on the edge of the rectangle;
otherwise returns false.
Upstream PySide2 reference signatures (binding differences may apply):
contains(self, p: PySide2.QtCore.QPointF) -> bool
contains(self, r: PySide2.QtCore.QRectF) -> bool
contains(self, x: float, y: float) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#contains
height
height() -> float
X.height() -> float
Supplemental documentation: Qt 5 reference:
qreal QRectF::height() const
Returns the height of the rectangle.
See also setHeight(), width(), and size().
Upstream PySide2 reference signatures (binding differences may apply):
height(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#height
intersected
intersected(other: Any) -> Any
X.intersected(other) -> PythonQt.QtCore.QRectF
Supplemental documentation: Qt 5 reference:
QRectF QRectF::intersected(const QRectF \&rectangle) const
Returns the intersection of this rectangle and the given rectangle. Note that
r.intersected(s) is equivalent to r & s.

This function was introduced in Qt 4.2.
See also intersects(), united(), and operator\&\=().
Upstream PySide2 reference signatures (binding differences may apply):
intersected(self, other: PySide2.QtCore.QRectF) -> PySide2.QtCore.QRectF
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#intersected
intersects
intersects(r: Any) -> bool
X.intersects(r) -> bool
Supplemental documentation: Qt 5 reference:
bool QRectF::intersects(const QRectF \&rectangle) const
Returns true if this rectangle intersects with the given rectangle (i.e. there is a
non-empty area of overlap between them), otherwise returns false.
The intersection rectangle can be retrieved using the intersected() function.
See also contains().
Upstream PySide2 reference signatures (binding differences may apply):
intersects(self, r: PySide2.QtCore.QRectF) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#intersects
isEmpty
isEmpty() -> bool
X.isEmpty() -> bool
Supplemental documentation: Qt 5 reference:
bool QRectF::isEmpty() const
Returns true if the rectangle is empty, otherwise returns false.
An empty rectangle has width()
\<\= 0 or height() \<\= 0. An
empty rectangle is not valid (i.e., isEmpty() \=\=
()).
Use the normalized() function to retrieve a rectangle where the corners are swapped.
See also isNull(), isValid(), and normalized().
Upstream PySide2 reference signatures (binding differences may apply):
isEmpty(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#isEmpty
isNull
isNull() -> bool
X.isNull() -> bool
Supplemental documentation: Qt 5 reference:
bool QRectF::isNull() const
Returns true if the rectangle is a null rectangle, otherwise returns false.
A null rectangle has both the width and the height set to 0. A null rectangle is also empty, and hence not valid.
See also isEmpty() and isValid().
Upstream PySide2 reference signatures (binding differences may apply):
isNull(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#isNull
isValid
isValid() -> bool
X.isValid() -> bool
Supplemental documentation: Qt 5 reference:
bool QRectF::isValid() const
Returns true if the rectangle is valid, otherwise returns false.
A valid rectangle has a width()
> 0 and height() > 0. Note
that non-trivial operations like intersections are not defined for invalid rectangles. A
valid rectangle is not empty (i.e., isValid() \=\=
()).
See also isNull(), isEmpty(), and normalized().
Upstream PySide2 reference signatures (binding differences may apply):
isValid(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#isValid
left
left() -> float
X.left() -> float
Supplemental documentation: Qt 5 reference:
qreal QRectF::left() const
Returns the x-coordinate of the rectangle's left edge. Equivalent to x().
See also setLeft(), topLeft(), and bottomLeft().
Upstream PySide2 reference signatures (binding differences may apply):
left(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#left
marginsAdded
marginsAdded(margins: Any) -> Any
X.marginsAdded(margins) -> PythonQt.QtCore.QRectF
Supplemental documentation: Qt 5 reference:
QRectF QRectF::marginsAdded(const QMarginsF \&margins) const
Returns a rectangle grown by the margins.
This function was introduced in Qt 5.3.
See also operator+\=(), marginsRemoved(), and operator-\=().
Upstream PySide2 reference signatures (binding differences may apply):
marginsAdded(self, margins: PySide2.QtCore.QMarginsF) -> PySide2.QtCore.QRectF
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#marginsAdded
marginsRemoved
marginsRemoved(margins: Any) -> Any
X.marginsRemoved(margins) -> PythonQt.QtCore.QRectF
Supplemental documentation: Qt 5 reference:
QRectF QRectF::marginsRemoved(const QMarginsF \&margins) const
Removes the margins from the rectangle, shrinking it.
This function was introduced in Qt 5.3.
See also marginsAdded(), operator+\=(), and operator-\=().
Upstream PySide2 reference signatures (binding differences may apply):
marginsRemoved(self, margins: PySide2.QtCore.QMarginsF) -> PySide2.QtCore.QRectF
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#marginsRemoved
moveBottom
moveBottom(pos: float) -> None
X.moveBottom(pos)
Supplemental documentation: Qt 5 reference:
void QRectF::moveBottom(qreal y)
Moves the rectangle vertically, leaving the rectangle's bottom edge at the given y coordinate. The rectangle's size is unchanged.
See also bottom(), setBottom(), and moveTop().
Upstream PySide2 reference signatures (binding differences may apply):
moveBottom(self, pos: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#moveBottom
moveBottomLeft
moveBottomLeft(p: Any) -> None
X.moveBottomLeft(p)
Supplemental documentation: Qt 5 reference:
void QRectF::moveBottomLeft(const QPointF \&position)
Moves the rectangle, leaving the bottom-left corner at the given position. The rectangle's size is unchanged.
See also setBottomLeft(), moveBottom(), and moveLeft().
Upstream PySide2 reference signatures (binding differences may apply):
moveBottomLeft(self, p: PySide2.QtCore.QPointF) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#moveBottomLeft
moveBottomRight
moveBottomRight(p: Any) -> None
X.moveBottomRight(p)
Supplemental documentation: Qt 5 reference:
void QRectF::moveBottomRight(const QPointF \&position)
Moves the rectangle, leaving the bottom-right corner at the given position. The rectangle's size is unchanged.
See also setBottomRight(), moveBottom(), and moveRight().
Upstream PySide2 reference signatures (binding differences may apply):
moveBottomRight(self, p: PySide2.QtCore.QPointF) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#moveBottomRight
moveCenter
moveCenter(p: Any) -> None
X.moveCenter(p)
Supplemental documentation: Qt 5 reference:
void QRectF::moveCenter(const QPointF \&position)
Moves the rectangle, leaving the center point at the given position. The rectangle's size is unchanged.
See also center().
Upstream PySide2 reference signatures (binding differences may apply):
moveCenter(self, p: PySide2.QtCore.QPointF) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#moveCenter
moveLeft
moveLeft(pos: float) -> None
X.moveLeft(pos)
Supplemental documentation: Qt 5 reference:
void QRectF::moveLeft(qreal x)
Moves the rectangle horizontally, leaving the rectangle's left edge at the given x coordinate. The rectangle's size is unchanged.
See also left(), setLeft(), and moveRight().
Upstream PySide2 reference signatures (binding differences may apply):
moveLeft(self, pos: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#moveLeft
moveRight
moveRight(pos: float) -> None
X.moveRight(pos)
Supplemental documentation: Qt 5 reference:
void QRectF::moveRight(qreal x)
Moves the rectangle horizontally, leaving the rectangle's right edge at the given x coordinate. The rectangle's size is unchanged.
See also right(), setRight(), and moveLeft().
Upstream PySide2 reference signatures (binding differences may apply):
moveRight(self, pos: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#moveRight
moveTo
moveTo(x: Any, y: Any) -> None
X.moveTo(x, y)
Supplemental documentation: Qt 5 reference:
void QRectF::moveTo(qreal x, qreal y)
Moves the rectangle, leaving the top-left corner at the given position (x, y). The rectangle's size is unchanged.
See also translate() and moveTopLeft().
void QRectF::moveTo(const QPointF \&position)
This is an overloaded function.
Moves the rectangle, leaving the top-left corner at the given position.
Upstream PySide2 reference signatures (binding differences may apply):
moveTo(self, p: PySide2.QtCore.QPointF) -> None
moveTo(self, x: float, y: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#moveTo
moveTop
moveTop(pos: float) -> None
X.moveTop(pos)
Supplemental documentation: Qt 5 reference:
void QRectF::moveTop(qreal y)
Moves the rectangle vertically, leaving the rectangle's top line at the given y coordinate. The rectangle's size is unchanged.
See also top(), setTop(), and moveBottom().
Upstream PySide2 reference signatures (binding differences may apply):
moveTop(self, pos: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#moveTop
moveTopLeft
moveTopLeft(p: Any) -> None
X.moveTopLeft(p)
Supplemental documentation: Qt 5 reference:
void QRectF::moveTopLeft(const QPointF \&position)
Moves the rectangle, leaving the top-left corner at the given position. The rectangle's size is unchanged.
See also setTopLeft(), moveTop(), and moveLeft().
Upstream PySide2 reference signatures (binding differences may apply):
moveTopLeft(self, p: PySide2.QtCore.QPointF) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#moveTopLeft
moveTopRight
moveTopRight(p: Any) -> None
X.moveTopRight(p)
Supplemental documentation: Qt 5 reference:
void QRectF::moveTopRight(const QPointF \&position)
Moves the rectangle, leaving the top-right corner at the given position. The rectangle's size is unchanged.
See also setTopRight(), moveTop(), and moveRight().
Upstream PySide2 reference signatures (binding differences may apply):
moveTopRight(self, p: PySide2.QtCore.QPointF) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#moveTopRight
normalized
normalized() -> Any
X.normalized() -> PythonQt.QtCore.QRectF
Supplemental documentation: Qt 5 reference:
QRectF QRectF::normalized() const
Returns a normalized rectangle; i.e., a rectangle that has a non-negative width and height.
If width() \< 0 the function swaps the left and right corners, and it swaps the top and bottom corners if height() \< 0.
See also isValid() and isEmpty().
Upstream PySide2 reference signatures (binding differences may apply):
normalized(self) -> PySide2.QtCore.QRectF
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#normalized
right
right() -> float
X.right() -> float
Supplemental documentation: Qt 5 reference:
qreal QRectF::right() const
Returns the x-coordinate of the rectangle's right edge.
See also setRight(), topRight(), and bottomRight().
Upstream PySide2 reference signatures (binding differences may apply):
right(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#right
setBottom
setBottom(pos: float) -> None
X.setBottom(pos)
Supplemental documentation: Qt 5 reference:
void QRectF::setBottom(qreal y)
Sets the bottom edge of the rectangle to the given y coordinate. May change the height, but will never change the top edge of the rectangle.
See also bottom() and moveBottom().
Upstream PySide2 reference signatures (binding differences may apply):
setBottom(self, pos: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#setBottom
setBottomLeft
setBottomLeft(p: Any) -> None
X.setBottomLeft(p)
Supplemental documentation: Qt 5 reference:
void QRectF::setBottomLeft(const QPointF \&position)
Set the bottom-left corner of the rectangle to the given position. May change the size, but will never change the top-right corner of the rectangle.
See also bottomLeft() and moveBottomLeft().
Upstream PySide2 reference signatures (binding differences may apply):
setBottomLeft(self, p: PySide2.QtCore.QPointF) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#setBottomLeft
setBottomRight
setBottomRight(p: Any) -> None
X.setBottomRight(p)
Supplemental documentation: Qt 5 reference:
void QRectF::setBottomRight(const QPointF \&position)
Set the bottom-right corner of the rectangle to the given position. May change the size, but will never change the top-left corner of the rectangle.
See also bottomRight() and moveBottomRight().
Upstream PySide2 reference signatures (binding differences may apply):
setBottomRight(self, p: PySide2.QtCore.QPointF) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#setBottomRight
setCoords
setCoords(x1: float, y1: float, x2: float, y2: float) -> None
X.setCoords(x1, y1, x2, y2)
Supplemental documentation: Qt 5 reference:
void QRectF::setCoords(qreal x1, qreal y1, qreal x2, qreal y2)
Sets the coordinates of the rectangle's top-left corner to (x1, y1), and the coordinates of its bottom-right corner to (x2, y2).
See also getCoords() and setRect().
Upstream PySide2 reference signatures (binding differences may apply):
setCoords(self, x1: float, y1: float, x2: float, y2: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#setCoords
setHeight
setHeight(h: float) -> None
X.setHeight(h)
Supplemental documentation: Qt 5 reference:
void QRectF::setHeight(qreal height)
Sets the height of the rectangle to the given height. The bottom edge is changed, but not the top one.
See also height() and setSize().
Upstream PySide2 reference signatures (binding differences may apply):
setHeight(self, h: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#setHeight
setLeft
setLeft(pos: float) -> None
X.setLeft(pos)
Supplemental documentation: Qt 5 reference:
void QRectF::setLeft(qreal x)
Sets the left edge of the rectangle to the given x coordinate. May change the width, but will never change the right edge of the rectangle.
Equivalent to setX().
See also left() and moveLeft().
Upstream PySide2 reference signatures (binding differences may apply):
setLeft(self, pos: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#setLeft
setRect
setRect(x: float, y: float, w: float, h: float) -> None
X.setRect(x, y, w, h)
Supplemental documentation: Qt 5 reference:
void QRectF::setRect(qreal x, qreal y, qreal width, qreal height)
Sets the coordinates of the rectangle's top-left corner to (x, y), and its size to the given width and height.
See also getRect() and setCoords().
Upstream PySide2 reference signatures (binding differences may apply):
setRect(self, x: float, y: float, w: float, h: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#setRect
setRight
setRight(pos: float) -> None
X.setRight(pos)
Supplemental documentation: Qt 5 reference:
void QRectF::setRight(qreal x)
Sets the right edge of the rectangle to the given x coordinate. May change the width, but will never change the left edge of the rectangle.
See also right() and moveRight().
Upstream PySide2 reference signatures (binding differences may apply):
setRight(self, pos: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#setRight
setSize
setSize(s: Any) -> None
X.setSize(s)
Supplemental documentation: Qt 5 reference:
void QRectF::setSize(const QSizeF \&size)
Sets the size of the rectangle to the given size. The top-left corner is not moved.
See also size(), setWidth(), and setHeight().
Upstream PySide2 reference signatures (binding differences may apply):
setSize(self, s: PySide2.QtCore.QSizeF) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#setSize
setTop
setTop(pos: float) -> None
X.setTop(pos)
Supplemental documentation: Qt 5 reference:
void QRectF::setTop(qreal y)
Sets the top edge of the rectangle to the given y coordinate. May change the height, but will never change the bottom edge of the rectangle.
Equivalent to setY().
Upstream PySide2 reference signatures (binding differences may apply):
setTop(self, pos: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#setTop
setTopLeft
setTopLeft(p: Any) -> None
X.setTopLeft(p)
Supplemental documentation: Qt 5 reference:
void QRectF::setTopLeft(const QPointF \&position)
Set the top-left corner of the rectangle to the given position. May change the size, but will never change the bottom-right corner of the rectangle.
See also topLeft() and moveTopLeft().
Upstream PySide2 reference signatures (binding differences may apply):
setTopLeft(self, p: PySide2.QtCore.QPointF) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#setTopLeft
setTopRight
setTopRight(p: Any) -> None
X.setTopRight(p)
Supplemental documentation: Qt 5 reference:
void QRectF::setTopRight(const QPointF \&position)
Set the top-right corner of the rectangle to the given position. May change the size, but will never change the bottom-left corner of the rectangle.
See also topRight() and moveTopRight().
Upstream PySide2 reference signatures (binding differences may apply):
setTopRight(self, p: PySide2.QtCore.QPointF) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#setTopRight