PythonQt.QtCore.QRectF · declarations 002
Back to PythonQt.QtCore.QRectF
setWidth
setWidth(w: float) -> None
X.setWidth(w)
Supplemental documentation: Qt 5 reference:
void QRectF::setWidth(qreal width)
Sets the width of the rectangle to the given width. The right edge is changed, but not the left one.
See also width() and setSize().
Upstream PySide2 reference signatures (binding differences may apply):
setWidth(self, w: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#setWidth
setX
setX(pos: float) -> None
X.setX(pos)
Supplemental documentation: Qt 5 reference:
void QRectF::setX(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 setLeft().
See also x(), setY(), and setTopLeft().
Upstream PySide2 reference signatures (binding differences may apply):
setX(self, pos: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#setX
setY
setY(pos: float) -> None
X.setY(pos)
Supplemental documentation: Qt 5 reference:
void QRectF::setY(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 setTop().
See also y(), setX(), and setTopLeft().
Upstream PySide2 reference signatures (binding differences may apply):
setY(self, pos: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#setY
size
size() -> Any
X.size() -> PythonQt.QtCore.QSizeF
Supplemental documentation: Qt 5 reference:
QSizeF QRectF::size() const
Returns the size of the rectangle.
See also setSize(), width(), and height().
Upstream PySide2 reference signatures (binding differences may apply):
size(self) -> PySide2.QtCore.QSizeF
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#size
toAlignedRect
toAlignedRect() -> Any
X.toAlignedRect() -> PythonQt.QtCore.QRect
Supplemental documentation: Qt 5 reference:
QRect QRectF::toAlignedRect() const
Returns a QRect based on the values of this rectangle that is the smallest possible integer rectangle that completely contains this rectangle.
This function was introduced in Qt 4.3.
See also toRect().
Upstream PySide2 reference signatures (binding differences may apply):
toAlignedRect(self) -> PySide2.QtCore.QRect
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#toAlignedRect
toRect
toRect() -> Any
X.toRect() -> PythonQt.QtCore.QRect
Supplemental documentation: Qt 5 reference:
QRect QRectF::toRect() const
Returns a QRect based on the values of this rectangle. Note that the coordinates in the returned rectangle are rounded to the nearest integer.
See also QRectF() and toAlignedRect().
Upstream PySide2 reference signatures (binding differences may apply):
toRect(self) -> PySide2.QtCore.QRect
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#toRect
top
top() -> float
X.top() -> float
Supplemental documentation: Qt 5 reference:
qreal QRectF::top() const
Returns the y-coordinate of the rectangle's top edge. Equivalent to y().
See also setTop(), topLeft(), and topRight().
Upstream PySide2 reference signatures (binding differences may apply):
top(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#top
topLeft
topLeft() -> Any
X.topLeft() -> PythonQt.QtCore.QPointF
Supplemental documentation: Qt 5 reference:
QPointF QRectF::topLeft() const
Returns the position of the rectangle's top-left corner.
See also setTopLeft(), top(), and left().
Upstream PySide2 reference signatures (binding differences may apply):
topLeft(self) -> PySide2.QtCore.QPointF
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#topLeft
topRight
topRight() -> Any
X.topRight() -> PythonQt.QtCore.QPointF
Supplemental documentation: Qt 5 reference:
QPointF QRectF::topRight() const
Returns the position of the rectangle's top-right corner.
See also setTopRight(), top(), and right().
Upstream PySide2 reference signatures (binding differences may apply):
topRight(self) -> PySide2.QtCore.QPointF
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#topRight
translate
translate(dx: Any, dy: Any) -> None
X.translate(dx, dy)
Supplemental documentation: Qt 5 reference:
void QRectF::translate(qreal dx, qreal dy)
Moves the rectangle dx along the x-axis and dy along the y-axis, relative to the current position. Positive values move the rectangle to the right and downwards.
See also moveTopLeft(), moveTo(), and translated().
void QRectF::translate(const QPointF \&offset)
This is an overloaded function.
Moves the rectangle offset.x() along the x axis and offset.y() along the y axis, relative to the current position.
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/qrectf.html#translate
translated
translated(dx: Any, dy: Any) -> Any
X.translated(dx, dy) -> PythonQt.QtCore.QRectF
Supplemental documentation: Qt 5 reference:
QRectF QRectF::translated(qreal dx, qreal dy) const
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis, relative to the current position. Positive values move the rectangle to the right and down.
See also translate().
QRectF QRectF::translated(const QPointF \&offset) const
This is an overloaded function.
Returns a copy of the rectangle that is translated offset.x() along the x axis and offset.y() along the y axis, relative to the current position.
Upstream PySide2 reference signatures (binding differences may apply):
translated(self, dx: float, dy: float) -> PySide2.QtCore.QRectF
translated(self, p: PySide2.QtCore.QPointF) -> PySide2.QtCore.QRectF
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#translated
united
united(other: Any) -> Any
X.united(other) -> PythonQt.QtCore.QRectF
Supplemental documentation: Qt 5 reference:
QRectF QRectF::united(const QRectF \&rectangle) const
Returns the bounding rectangle of this rectangle and the given rectangle.

This function was introduced in Qt 4.2.
See also intersected().
Upstream PySide2 reference signatures (binding differences may apply):
united(self, other: PySide2.QtCore.QRectF) -> PySide2.QtCore.QRectF
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#united
width
width() -> float
X.width() -> float
Supplemental documentation: Qt 5 reference:
qreal QRectF::width() const
Returns the width of the rectangle.
See also setWidth(), height(), and size().
Upstream PySide2 reference signatures (binding differences may apply):
width(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#width
x
x() -> float
X.x() -> float
Supplemental documentation: Qt 5 reference:
qreal QRectF::x() const
Returns the x-coordinate of the rectangle's left edge. Equivalent to left().
See also setX(), y(), and topLeft().
Upstream PySide2 reference signatures (binding differences may apply):
x(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#x
y
y() -> float
X.y() -> float
Supplemental documentation: Qt 5 reference:
qreal QRectF::y() const
Returns the y-coordinate of the rectangle's top edge. Equivalent to top().
See also setY(), x(), and topLeft().
Upstream PySide2 reference signatures (binding differences may apply):
y(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qrectf.html#y