Skip to content

PythonQt.QtCore.QRect · declarations 002

Back to PythonQt.QtCore.QRect

setWidth

setWidth(w: int) -> None

X.setWidth(w)

Supplemental documentation: Qt 5 reference:

void QRect::setWidth(int 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: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qrect.html#setWidth

setX

setX(x: int) -> None

X.setX(x)

Supplemental documentation: Qt 5 reference:

void QRect::setX(int 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, x: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qrect.html#setX

setY

setY(y: int) -> None

X.setY(y)

Supplemental documentation: Qt 5 reference:

void QRect::setY(int 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, y: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qrect.html#setY

size

size() -> Any

X.size() -> PythonQt.QtCore.QSize

Supplemental documentation: Qt 5 reference:

QSize QRect::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.QSize

Source: https://doc.qt.io/archives/qt-5.15/qrect.html#size

top

top() -> int

X.top() -> int

Supplemental documentation: Qt 5 reference:

int QRect::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) -> int

Source: https://doc.qt.io/archives/qt-5.15/qrect.html#top

topLeft

topLeft() -> Any

X.topLeft() -> PythonQt.QtCore.QPoint

Supplemental documentation: Qt 5 reference:

QPoint QRect::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.QPoint

Source: https://doc.qt.io/archives/qt-5.15/qrect.html#topLeft

topRight

topRight() -> Any

X.topRight() -> PythonQt.QtCore.QPoint

Supplemental documentation: Qt 5 reference:

QPoint QRect::topRight() const

Returns the position of the rectangle's top-right corner.

Note that for historical reasons this function returns QPoint(left() + width() -1, top()).

See also setTopRight(), top(), and right().

Upstream PySide2 reference signatures (binding differences may apply):

topRight(self) -> PySide2.QtCore.QPoint

Source: https://doc.qt.io/archives/qt-5.15/qrect.html#topRight

translate

translate(dx: Any, dy: Any) -> None

X.translate(dx, dy)

Supplemental documentation: Qt 5 reference:

void QRect::translate(int dx, int 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 down.

See also moveTopLeft(), moveTo(), and translated().

void QRect::translate(const QPoint \&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: int, dy: int) -> None
translate(self, p: PySide2.QtCore.QPoint) -> None

Source: https://doc.qt.io/archives/qt-5.15/qrect.html#translate

translated

translated(dx: Any, dy: Any) -> Any

X.translated(dx, dy) -> PythonQt.QtCore.QRect

Supplemental documentation: Qt 5 reference:

QRect QRect::translated(int dx, int 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().

QRect QRect::translated(const QPoint \&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: int, dy: int) -> PySide2.QtCore.QRect
translated(self, p: PySide2.QtCore.QPoint) -> PySide2.QtCore.QRect

Source: https://doc.qt.io/archives/qt-5.15/qrect.html#translated

united

united(other: Any) -> Any

X.united(other) -> PythonQt.QtCore.QRect

Supplemental documentation: Qt 5 reference:

QRect QRect::united(const QRect \&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.QRect) -> PySide2.QtCore.QRect

Source: https://doc.qt.io/archives/qt-5.15/qrect.html#united

width

width() -> int

X.width() -> int

Supplemental documentation: Qt 5 reference:

int QRect::width() const

Returns the width of the rectangle.

See also setWidth(), height(), and size().

Upstream PySide2 reference signatures (binding differences may apply):

width(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qrect.html#width

x

x() -> int

X.x() -> int

Supplemental documentation: Qt 5 reference:

int QRect::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) -> int

Source: https://doc.qt.io/archives/qt-5.15/qrect.html#x

y

y() -> int

X.y() -> int

Supplemental documentation: Qt 5 reference:

int QRect::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) -> int

Source: https://doc.qt.io/archives/qt-5.15/qrect.html#y