QGraphicsObject露

The QGraphicsObject class provides a base class for all graphics items that require signals, slots and properties. More鈥�

Inheritance diagram of PySide2.QtWidgets.QGraphicsObject

Inherited by: QChart, QLegend, QPolarChart, QGraphicsVideoItem, QGraphicsSvgItem, QGraphicsProxyWidget, QGraphicsTextItem, QGraphicsWidget

New in version 4.6.

Synopsis露

Functions露

Signals露

Detailed Description露

The class extends a QGraphicsItem with QObject 鈥榮 signal/slot and property mechanisms. It maps many of QGraphicsItem 鈥榮 basic setters and getters to properties and adds notification signals for many of them.

Parents and Children露

Each graphics object can be constructed with a parent item. This ensures that the item will be destroyed when its parent item is destroyed. Although QGraphicsObject inherits from both QObject and QGraphicsItem , you should use the functions provided by QGraphicsItem , not QObject , to manage the relationships between parent and child items.

The relationships between items can be explored using the parentItem() and childItems() functions. In the hierarchy of items in a scene, the parentObject() and parentWidget() functions are the equivalent of the parent() and parentWidget() functions for QWidget subclasses.

See also

QGraphicsWidget

class PySide2.QtWidgets.QGraphicsObject([parent=None])露

Constructs a QGraphicsObject with parent .

PySide2.QtWidgets.QGraphicsObject.childrenChanged()露
PySide2.QtWidgets.QGraphicsObject.enabledChanged()露
PySide2.QtWidgets.QGraphicsObject.grabGesture(type[, flags=Qt.GestureFlags()])露
Parameters:

Subscribes the graphics object to the given gesture with specific flags .

PySide2.QtWidgets.QGraphicsObject.heightChanged()露
PySide2.QtWidgets.QGraphicsObject.opacityChanged()露
PySide2.QtWidgets.QGraphicsObject.parentChanged()露
PySide2.QtWidgets.QGraphicsObject.rotationChanged()露
PySide2.QtWidgets.QGraphicsObject.scaleChanged()露
PySide2.QtWidgets.QGraphicsObject.ungrabGesture(type)露
Parameters:

type 鈥� GestureType

Unsubscribes the graphics object from the given gesture .

PySide2.QtWidgets.QGraphicsObject.visibleChanged()露
PySide2.QtWidgets.QGraphicsObject.widthChanged()露
PySide2.QtWidgets.QGraphicsObject.xChanged()露
PySide2.QtWidgets.QGraphicsObject.yChanged()露
PySide2.QtWidgets.QGraphicsObject.zChanged()露