class QGraphicsSceneResizeEvent#

The QGraphicsSceneResizeEvent class provides events for widget resizing in the graphics view framework. More

Inheritance diagram of PySide6.QtWidgets.QGraphicsSceneResizeEvent

Synopsis#

Methods#

注意

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

详细描述#

QGraphicsWidget的几何形状发生变化时,它会立即向自身发送一个QGraphicsSceneResizeEvent

它与QResizeEvent类似,但其尺寸,即oldSize()newSize(),使用QSizeF而不是QSize。

__init__()#

构造一个QGraphicsSceneResizeEvent对象。

newSize()#
返回类型::

QSizeF

返回新的大小(即当前大小)。

oldSize()#
返回类型::

QSizeF

返回旧的大小(即在组件调整大小之前的尺寸)。

setNewSize(size)#
参数::

sizeQSizeF

setOldSize(size)#
参数::

sizeQSizeF