QRect Class

QRect 类使用整数精度定义平面内的矩形。更多

头文件: #include <QRect>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core

该类可等价比较

该类可与QRectF 进行等价比较

注意:该类中的所有函数都是可重入的

公共函数

QRect()
QRect(const QPoint &topLeft, const QPoint &bottomRight)
QRect(const QPoint &topLeft, const QSize &size)
QRect(int x, int y, int width, int height)
void adjust(int dx1, int dy1, int dx2, int dy2)
QRect adjusted(int dx1, int dy1, int dx2, int dy2) const
int bottom() const
QPoint bottomLeft() const
QPoint bottomRight() const
QPoint center() const
bool contains(const QPoint &point, bool proper = false) const
bool contains(const QRect &rectangle, bool proper = false) const
bool contains(int x, int y) const
bool contains(int x, int y, bool proper) const
void getCoords(int *x1, int *y1, int *x2, int *y2) const
void getRect(int *x, int *y, int *width, int *height) const
int height() const
QRect intersected(const QRect &rectangle) const
bool intersects(const QRect &rectangle) const
bool isEmpty() const
bool isNull() const
bool isValid() const
int left() const
QRect marginsAdded(const QMargins &margins) const
QRect marginsRemoved(const QMargins &margins) const
void moveBottom(int y)
void moveBottomLeft(const QPoint &position)
void moveBottomRight(const QPoint &position)
void moveCenter(const QPoint &position)
void moveLeft(int x)
void moveRight(int x)
void moveTo(const QPoint &position)
void moveTo(int x, int y)
void moveTop(int y)
void moveTopLeft(const QPoint &position)
void moveTopRight(const QPoint &position)
QRect normalized() const
int right() const
void setBottom(int y)
void setBottomLeft(const QPoint &position)
void setBottomRight(const QPoint &position)
void setCoords(int x1, int y1, int x2, int y2)
void setHeight(int height)
void setLeft(int x)
void setRect(int x, int y, int width, int height)
void setRight(int x)
void setSize(const QSize &size)
void setTop(int y)
void setTopLeft(const QPoint &position)
void setTopRight(const QPoint &position)
void setWidth(int width)
void setX(int x)
void setY(int y)
QSize size() const
CGRect toCGRect() const
(since 6.4) QRectF toRectF() const
int top() const
QPoint topLeft() const
QPoint topRight() const
void translate(int dx, int dy)
void translate(const QPoint &offset)
QRect translated(int dx, int dy) const
QRect translated(const QPoint &offset) const
QRect transposed() const
QRect united(const QRect &rectangle) const
int width() const
int x() const
int y() const
QRect operator&(const QRect &rectangle) const
QRect &operator&=(const QRect &rectangle)
QRect &operator+=(const QMargins &margins)
QRect &operator-=(const QMargins &margins)
QRect operator|(const QRect &rectangle) const
QRect &operator|=(const QRect &rectangle)

静态公共成员

(since 6.0) QRect span(const QPoint &p1, const QPoint &p2)
bool operator!=(const QRect &lhs, const QRect &rhs)
QRect operator+(const QMargins &margins, const QRect &rectangle)
QRect operator+(const QRect &rectangle, const QMargins &margins)
QRect operator-(const QRect &lhs, const QMargins &rhs)
QDataStream &operator<<(QDataStream &stream, const QRect &rectangle)
bool operator==(const QRect &lhs, const QRect &rhs)
QDataStream &operator>>(QDataStream &stream, QRect &rectangle)

详细描述

矩形通常用左上角和尺寸表示。QRect 的大小(宽度和高度)总是等同于数学矩形,而数学矩形是矩形渲染的基础。

QRect 可以用一组左、上、宽和高整数来构造,也可以用QPointQSize 来构造。下面的代码创建了两个完全相同的矩形。

QRect r1(100, 200, 11, 16);
QRect r2(QPoint(100, 200), QSize(11, 16));

还有第三个构造函数可以使用左上角和右下角坐标创建 QRect,但我们建议您避免使用它。理由是由于历史原因,由bottom() 和right() 函数返回的值偏离了矩形的真正右下角。

QRect 类提供了一系列函数,用于返回各种矩形坐标,并可对其进行操作。QRect 还提供了将矩形相对于各种坐标移动的函数。此外,还有一个moveTo() 函数可以移动矩形,使其左上角位于给定坐标处。另外,translate() 函数将矩形移动到相对于当前位置的给定偏移量,而translated() 函数则返回该矩形的平移副本。

size() 函数以QSize 的形式返回矩形的尺寸。也可以使用width() 和height() 函数单独获取尺寸。要操作尺寸,请使用setSize(),setWidth() 或setHeight() 函数。另外,也可以通过使用setBottom() 或setRight() 等设置矩形坐标的函数来改变尺寸。

contains() 函数用于判断给定的点是否在矩形内部,如果该矩形与给定的矩形相交,则intersects() 函数返回true 。QRect 类还提供intersected() 函数和united() 函数,前者返回相交矩形,后者返回包围给定矩形和 this:

如果left() >right() 或top() >bottom() ,则isEmpty() 函数返回true 。请注意,空矩形无效:如果left() <=right() top() <=bottom(),则 isValid() 函数返回true 。另一方面,空矩形(isNull() == true)的宽度和高度都设置为 0。

请注意,由于 QRect 和QRectF 的定义方式不同,空 QRect 的定义方式与QRectF 基本相同。

最后,QRect 对象可以流式传输,也可以比较。

渲染

使用anti-aliased 画图器时,QRect 的边界线将对称地渲染在数学矩形边界线的两侧。但在使用别名绘制器(默认情况下)时,则会适用其他规则。

当使用一像素宽的笔进行渲染时,QRect 的边界线将被渲染到数学矩形边界线的右侧和下方。

当使用两像素宽的笔进行渲染时,边界线将被数学矩形从中间分开。当笔的像素数设置为偶数时,会出现这种情况,而使用奇数像素的笔时,备用像素会像单像素的情况一样,呈现在数学矩形的右侧和下方。

逻辑表示一像素宽的笔
两像素宽的笔三像素宽的笔

坐标

QRect 类提供了一系列函数,用于返回各种矩形坐标,并可对其进行操作。QRect 还提供了相对于各种坐标移动矩形的函数。

例如left()、setLeft() 和moveLeft() 函数:left() 返回矩形左边缘的 x 坐标,setLeft() 将矩形的左边缘设置为给定的 x 坐标(可能会改变宽度,但绝不会改变矩形的右边缘),moveLeft() 水平移动整个矩形,将矩形的左边缘保留在给定的 x 坐标处,其大小保持不变。

请注意,由于历史原因,bottom() 和right() 函数返回的值与真正的矩形右下角有偏差:right() 函数返回 left() +width() - 1,而bottom() 函数返回top() +height() - 1bottomRight() 方便函数返回的点也是如此。此外,topRight() 和bottomLeft() 函数的 x 坐标和 y 坐标分别包含与真实右边缘和底边缘的相同偏差。

我们建议您使用x() +width() 和y() +height() 来查找真正的右下角,避免使用right() 和bottom() 。另一种解决方案是使用QRectFQRectF 类使用浮点精度坐标在平面上定义了一个矩形,而QRectF::right() 和QRectF::bottom() 函数确实会返回右下角坐标。

此外,还可以使用adjust() 函数为该矩形的坐标添加偏移量,以及使用adjusted() 函数在调整原始矩形的基础上获取一个新矩形。如果宽度和高度中的任何一个为负值,则使用normalized() 函数获取一个四角互换的矩形。

此外,QRect 还提供了提取矩形左上角和右下角位置的getCoords() 函数,以及提取矩形左上角、宽度和高度的getRect() 函数。使用setCoords() 和setRect() 函数可以一次性操作矩形的坐标和尺寸。

限制条件

QRect 受限于int 类型的最小值和最大值。如果对 QRect 进行的操作可能导致值超出此范围,则会产生未定义的行为。

另请参阅 QRectFQRegion

成员函数文档

[constexpr noexcept] QRect::QRect()

构造一个空矩形。

另请参阅 isNull()。

[constexpr noexcept] QRect::QRect(const QPoint &topLeft, const QPoint &bottomRight)

构造一个包含topLeftbottomRight 两角的矩形。

如果bottomRighttopLeft 的左上方,则定义的矩形不包含这两个角。

注: 要确保两个点都包含在内,而不管相对顺序如何,请使用span() 。

另请参阅 setTopLeft()、setBottomRight() 和span()。

[constexpr noexcept] QRect::QRect(const QPoint &topLeft, const QSize &size)

构造一个矩形,该矩形的角为topLeft ,角值为size

另请参阅 setTopLeft() 和setSize() 。

[constexpr noexcept] QRect::QRect(int x, int y, int width, int height)

构造一个以 (x,y) 为左上角、以widthheight 为给定值的矩形。

另请参见 setRect().

[constexpr noexcept] void QRect::adjust(int dx1, int dy1, int dx2, int dy2)

dx1,dy1,dx2dy2 分别添加到矩形的现有坐标中。

另请参阅 adjusted() 和setRect()。

[constexpr noexcept] QRect QRect::adjusted(int dx1, int dy1, int dx2, int dy2) const

返回一个新矩形,在此矩形的现有坐标上分别添加dx1,dy1,dx2dy2

另请参见 adjust().

[constexpr noexcept] int QRect::bottom() const

返回矩形底边的 y 坐标。

请注意,由于历史原因,此函数返回top() +height() - 1;使用y() +height() 可获取真正的 y 坐标。

另请参见 setBottom()、bottomLeft() 和bottomRight()。

[constexpr noexcept] QPoint QRect::bottomLeft() const

返回矩形左下角的位置。请注意,由于历史原因,此函数返回QPoint(left(),top() +height() - 1)。

另请参见 setBottomLeft()、bottom() 和left()。

[constexpr noexcept] QPoint QRect::bottomRight() const

返回矩形右下角的位置。

请注意,由于历史原因,此函数返回QPoint(left() +width() -1,top() +height() - 1)。

另请参阅 setBottomRight()、bottom() 和right()。

[constexpr noexcept] QPoint QRect::center() const

返回矩形的中心点。

另请参阅 moveCenter()。

[noexcept] bool QRect::contains(const QPoint &point, bool proper = false) const

如果给定的point 位于矩形内部或边缘,则返回true ,否则返回false 。如果proper 为 true,则只有当给定的point 位于矩形内部(即不在矩形边缘)时,此函数才会返回true

另请参阅 intersects() 。

[noexcept] bool QRect::contains(const QRect &rectangle, bool proper = false) const

这是一个重载函数。

如果给定的rectangle 位于此矩形内,则返回true 。否则返回false 。如果proper 为 true,则只有当rectangle 完全位于此矩形内部(不在边缘上)时,此函数才会返回true

[noexcept] bool QRect::contains(int x, int y) const

这是一个重载函数。

如果点 (x,y) 在此矩形内,则返回true ,否则返回false

[noexcept] bool QRect::contains(int x, int y, bool proper) const

这是一个重载函数。

如果点 (x,y) 位于矩形内部或边缘,则返回true ,否则返回false 。如果proper 为 true,则只有当点完全位于矩形内部(不在边缘上)时,此函数才会返回true

[constexpr] void QRect::getCoords(int *x1, int *y1, int *x2, int *y2) const

提取矩形左上角的位置到 *x1 和 *y1 ,提取矩形右下角的位置到 *x2 和 *y2

另请参阅 setCoords() 和getRect()。

[constexpr] void QRect::getRect(int *x, int *y, int *width, int *height) const

提取矩形左上角的位置到 *x 和 *y ,其尺寸到 *width 和 *height

另请参阅 setRect() 和getCoords()。

[constexpr noexcept] int QRect::height() const

返回矩形的高度。

另请参阅 setHeight()、width() 和size()。

[noexcept] QRect QRect::intersected(const QRect &rectangle) const

返回此矩形与给定rectangle 的交集。请注意r.intersected(s) 等同于r & s

另请参阅 intersects()、united() 和operator&=()。

[noexcept] bool QRect::intersects(const QRect &rectangle) const

如果该矩形与给定的rectangle 相交(即至少有一个像素在两个矩形内),则返回true ,否则返回false

相交矩形可通过intersected() 函数获取。

另请参见 contains()。

[constexpr noexcept] bool QRect::isEmpty() const

如果矩形为空,则返回true ,否则返回false

空矩形的left() >right() 或top() >bottom() 。空矩形无效(即 isEmpty() == !isValid() )。

使用normalized() 函数可以获取一个四角互换的矩形。

另请参阅 isNull()、isValid() 和normalized()。

[constexpr noexcept] bool QRect::isNull() const

如果矩形为空矩形,则返回true ,否则返回false

空矩形的宽度和高度均设置为 0(即right() ==left() - 1 和bottom() ==top() - 1)。空矩形也是空的,因此无效。

另请参阅 isEmpty() 和isValid()。

[constexpr noexcept] bool QRect::isValid() const

如果矩形有效,则返回true ,否则返回false

有效矩形的left() <=right() 和top() <=bottom() 。请注意,无效矩形不定义交集等非三维操作。有效的矩形不是空的(即 isValid() == !isEmpty() )。

另请参见 isNull()、isEmpty() 和normalized()。

[constexpr noexcept] int QRect::left() const

返回矩形左边缘的 x 坐标。等价于x()。

另请参阅 setLeft()、topLeft() 和bottomLeft()。

[constexpr noexcept] QRect QRect::marginsAdded(const QMargins &margins) const

返回由margins 生长出的矩形。

另请参阅 operator+=(),marginsRemoved() 和operator-=().

[constexpr noexcept] QRect QRect::marginsRemoved(const QMargins &margins) const

从矩形中删除margins ,缩小矩形。

另请参阅 marginsAdded()、operator+=() 和operator-=()。

[constexpr noexcept] void QRect::moveBottom(int y)

垂直移动矩形,使矩形底边位于给定的y 坐标处。矩形的大小保持不变。

另请参阅 bottom()、setBottom() 和moveTop()。

[constexpr noexcept] void QRect::moveBottomLeft(const QPoint &position)

移动矩形,将左下角保留在给定的position 处。矩形的大小不变。

另请参阅 setBottomLeft()、moveBottom() 和moveLeft()。

[constexpr noexcept] void QRect::moveBottomRight(const QPoint &position)

移动矩形,将右下角留在给定的position 处。矩形的大小不变。

另请参阅 setBottomRight()、moveRight() 和moveBottom()。

[constexpr noexcept] void QRect::moveCenter(const QPoint &position)

移动矩形,将中心点留在给定的position 处。矩形的大小不变。

另请参见 center()。

[constexpr noexcept] void QRect::moveLeft(int x)

水平移动矩形,使矩形的左边缘位于给定的x 坐标处。矩形的大小保持不变。

另请参阅 left()、setLeft() 和moveRight()。

[constexpr noexcept] void QRect::moveRight(int x)

水平移动矩形,使矩形的右边缘位于给定的x 坐标处。矩形的大小保持不变。

另请参阅 right()、setRight() 和moveLeft()。

[constexpr noexcept] void QRect::moveTo(const QPoint &position)

移动矩形,将其左上角保留在给定的position 处。

[constexpr noexcept] void QRect::moveTo(int x, int y)

移动矩形,将左上角保留在指定位置 (x,y)。矩形的大小不变。

另请参阅 translate() 和moveTopLeft()。

[constexpr noexcept] void QRect::moveTop(int y)

垂直移动矩形,使矩形顶边位于给定的y 坐标处。矩形的大小保持不变。

另请参阅 top()、setTop() 和moveBottom()。

[constexpr noexcept] void QRect::moveTopLeft(const QPoint &position)

移动矩形,将左上角留在给定的position 处。矩形的大小不变。

另请参阅 setTopLeft()、moveTop() 和moveLeft()。

[constexpr noexcept] void QRect::moveTopRight(const QPoint &position)

移动矩形,将右上角留在给定的position 处。矩形的大小不变。

另请参阅 setTopRight()、moveTop() 和moveRight()。

[noexcept] QRect QRect::normalized() const

返回归一化矩形,即宽度和高度均为非负的矩形。

如果width() < 0,函数会交换左角和右角;如果height() < 0,函数会交换上角和下角。同时,角也会从非包含型变为包含型。

另请参见 isValid() 和isEmpty()。

返回矩形右边缘的 x 坐标。

请注意,由于历史原因,此函数返回left() +width() - 1;使用x() +width() 可获取真正的 x 坐标。

另请参见 setRight()、topRight() 和bottomRight()。

[constexpr noexcept] void QRect::setBottom(int y)

将矩形的底边设置为给定的y 坐标。可以改变高度,但不会改变矩形的上边缘。

另请参阅 bottom() 和moveBottom()。

[constexpr noexcept] void QRect::setBottomLeft(const QPoint &position)

将矩形的左下角设置为给定的position 。可以改变矩形的大小,但不会改变矩形的右上角。

另请参阅 bottomLeft() 和moveBottomLeft()。

[constexpr noexcept] void QRect::setBottomRight(const QPoint &position)

将矩形的右下角设置为给定的position 。可更改大小,但不会更改矩形的左上角。

另请参阅 bottomRight() 和moveBottomRight()。

[constexpr noexcept] void QRect::setCoords(int x1, int y1, int x2, int y2)

将矩形左上角的坐标设置为 (x1,y1),将矩形右下角的坐标设置为 (x2,y2)。

另请参阅 getCoords() 和setRect()。

[constexpr noexcept] void QRect::setHeight(int height)

将矩形的高度设置为给定的height 。底边会改变,但顶边不会。

另请参阅 height() 和setSize()。

[constexpr noexcept] void QRect::setLeft(int x)

将矩形的左边缘设置为给定的x 坐标。可以改变宽度,但不会改变矩形的右边缘。

等同于setX()。

另请参阅 left() 和moveLeft()。

[constexpr noexcept] void QRect::setRect(int x, int y, int width, int height)

将矩形左上角的坐标设置为 (x,y) ,并将其大小设置为给定的widthheight

另请参阅 getRect() 和setCoords()。

[constexpr noexcept] void QRect::setRight(int x)

将矩形的右边缘设置为给定的x 坐标。可以改变宽度,但不会改变矩形的左边缘。

另请参阅 right() 和moveRight()。

[constexpr noexcept] void QRect::setSize(const QSize &size)

将矩形的大小设置为给定的size 。左上角不会移动。

另请参阅 size()、setWidth() 和setHeight()。

[constexpr noexcept] void QRect::setTop(int y)

将矩形的顶边设置为给定的y 坐标。可以改变高度,但不会改变矩形的底边。

等同于setY()。

另请参阅 top() 和moveTop()。

[constexpr noexcept] void QRect::setTopLeft(const QPoint &position)

将矩形的左上角设置为给定的position 。可以改变矩形的大小,但不会改变矩形的右下角。

另请参阅 topLeft() 和moveTopLeft()。

[constexpr noexcept] void QRect::setTopRight(const QPoint &position)

将矩形的右上角设置为给定的position 。可更改大小,但不会更改矩形的左下角。

另请参阅 topRight() 和moveTopRight()。

[constexpr noexcept] void QRect::setWidth(int width)

将矩形的宽度设置为给定的width 。右边会改变,但左边不会。

另请参阅 width() 和setSize()。

[constexpr noexcept] void QRect::setX(int x)

将矩形的左边缘设置为给定的x 坐标。可以改变宽度,但不会改变矩形的右边缘。

等同于setLeft()。

另请参阅 x(),setY() 和setTopLeft()。

[constexpr noexcept] void QRect::setY(int y)

将矩形的顶边设置为给定的y 坐标。可以改变高度,但不会改变矩形的底边。

等同于setTop()。

另请参阅 y(),setX() 和setTopLeft()。

[constexpr noexcept] QSize QRect::size() const

返回矩形的大小。

另请参阅 setSize()、width() 和height()。

[static constexpr noexcept, since 6.0] QRect QRect::span(const QPoint &p1, const QPoint &p2)

返回一个跨p1p2 两点的矩形,包括这两点及两点之间的所有内容。

此函数在 Qt 6.0 中引入。

[noexcept] CGRect QRect::toCGRect() const

QRect 创建 CGRect。

另请参阅 QRectF::fromCGRect().

[constexpr noexcept, since 6.4] QRectF QRect::toRectF() const

将此矩形返回为具有浮点精度的矩形。

注意: QRectF(QRect) 构造函数一样,此函数保留矩形的size() 角,而不是其bottomRight() 角。

此函数在 Qt 6.4 中引入。

另请参阅 QRectF::toRect() 。

[constexpr noexcept] int QRect::top() const

返回矩形顶边的 y 坐标。等价于y()。

另请参阅 setTop()、topLeft() 和topRight()。

[constexpr noexcept] QPoint QRect::topLeft() const

返回矩形左上角的位置。

另请参阅 setTopLeft()、top() 和left()。

[constexpr noexcept] QPoint QRect::topRight() const

返回矩形右上角的位置。

请注意,由于历史原因,此函数返回QPoint(left() +width() -1,top()).

另请参阅 setTopRight()、top() 和right()。

[constexpr noexcept] void QRect::translate(int dx, int dy)

相对于当前位置,沿 x 轴移动矩形dx ,沿 y 轴移动矩形dy 。正值会使矩形向右和向下移动。

另请参阅 moveTopLeft()、moveTo() 和translated()。

[constexpr noexcept] void QRect::translate(const QPoint &offset)

这是一个重载函数。

相对于当前位置,沿 x 轴移动矩形offset.x() ,沿 y 轴移动矩形offset.y() 。

[constexpr noexcept] QRect QRect::translated(int dx, int dy) const

返回相对于当前位置沿 x 轴平移dx 和沿 y 轴平移dy 的矩形副本。正值会使矩形向右和向下移动。

另请参见 translate()。

[constexpr noexcept] QRect QRect::translated(const QPoint &offset) const

这是一个重载函数。

返回相对于当前位置沿 x 轴平移offset.x() 和沿 y 轴平移offset.y() 后的矩形副本。

[constexpr noexcept] QRect QRect::transposed() const

返回改变了宽度和高度的矩形副本:

QRect r = {15, 51, 42, 24};
r = r.transposed(); // r == {15, 51, 24, 42}

另请参见 QSize::transposed()。

[noexcept] QRect QRect::united(const QRect &rectangle) const

返回此矩形与给定rectangle 的边界矩形。

另请参见 intersected()。

[constexpr noexcept] int QRect::width() const

返回矩形的宽度。

另请参阅 setWidth()、height() 和size()。

[constexpr noexcept] int QRect::x() const

返回矩形左边缘的 x 坐标。等价于left()。

另请参阅 setX()、y() 和topLeft()。

[constexpr noexcept] int QRect::y() const

返回矩形顶边的 y 坐标。等价于top()。

另请参阅 setY()、x() 和topLeft()。

[noexcept] QRect QRect::operator&(const QRect &rectangle) const

返回此矩形与给定rectangle 的交集。如果没有交集,则返回空矩形。

另请参阅 operator&=() 和intersected()。

[noexcept] QRect &QRect::operator&=(const QRect &rectangle)

与给定的rectangle 相交。

另请参见 intersected() 和operator&()。

[constexpr noexcept] QRect &QRect::operator+=(const QMargins &margins)

margins 添加到矩形中,使其增长。

另请参阅 marginsAdded()、marginsRemoved() 和operator-=()。

[constexpr noexcept] QRect &QRect::operator-=(const QMargins &margins)

返回按margins 缩小的矩形。

另请参见 marginsRemoved()、operator+=() 和marginsAdded()。

[noexcept] QRect QRect::operator|(const QRect &rectangle) const

返回此矩形与给定rectangle 的边界矩形。

另请参阅 operator|=() 和united()。

[noexcept] QRect &QRect::operator|=(const QRect &rectangle)

将此矩形与给定的rectangle 相结合。

另请参阅 united() 和operator|()。

相关非会员

[constexpr noexcept] bool operator!=(const QRect &lhs, const QRect &rhs)

如果矩形lhsrhs 不同,则返回true ,否则返回false

[constexpr noexcept] QRect operator+(const QMargins &margins, const QRect &rectangle)

这是一个重载函数。

返回margins 生长的rectangle

[constexpr noexcept] QRect operator+(const QRect &rectangle, const QMargins &margins)

返回rectangle 生长的margins

[constexpr noexcept] QRect operator-(const QRect &lhs, const QMargins &rhs)

返回按rhs 边距缩小的lhs 矩形。

QDataStream &operator<<(QDataStream &stream, const QRect &rectangle)

将给定的rectangle 写入给定的stream ,并返回对该数据流的引用。

另请参阅 序列化 Qt 数据类型

[constexpr noexcept] bool operator==(const QRect &lhs, const QRect &rhs)

如果矩形lhsrhs 相等,则返回true ,否则返回false

QDataStream &operator>>(QDataStream &stream, QRect &rectangle)

从给定的stream 中读取一个矩形到给定的rectangle 中,并返回对该数据流的引用。

另请参阅 序列化 Qt 数据类型

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.