QGraphicsSceneResizeEvent Class
QGraphicsSceneResizeEvent 类为图形视图框架中的部件大小调整提供事件。更多
Header: | #include <QGraphicsSceneResizeEvent> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Widgets) target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
qmake: | QT += widgets |
继承: | QGraphicsSceneEvent |
公共函数
QGraphicsSceneResizeEvent() | |
virtual | ~QGraphicsSceneResizeEvent() |
QSizeF | newSize() const |
QSizeF | oldSize() const |
详细说明
当一个QGraphicsWidget 的几何体发生变化时,它会立即向自己发送一个 QGraphicsSceneResizeEvent。
它与QResizeEvent 类似,但其大小oldSize() 和newSize() 使用QSizeF 而不是QSize 。
另请参阅 QGraphicsWidget::setGeometry() 和QGraphicsWidget::resize()。
成员函数文档
QGraphicsSceneResizeEvent::QGraphicsSceneResizeEvent()
构造一个 QGraphicsSceneResizeEvent。
[virtual noexcept]
QGraphicsSceneResizeEvent::~QGraphicsSceneResizeEvent()
QSizeF QGraphicsSceneResizeEvent::newSize() const
返回新的大小(即当前大小)。
另请参阅 oldSize() 和QGraphicsWidget::resize()。
QSizeF QGraphicsSceneResizeEvent::oldSize() const
返回旧尺寸(即调整部件大小前的尺寸)。
另请参阅 newSize() 和QGraphicsWidget::resize()。
© 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.