QGraphicsSceneResizeEvent Class
QGraphicsSceneResizeEvent 类在图形视图框架中提供了用于小部件调整大小的事件。更多内容...
| 头文件: | #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()。
© 2026 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.