继承者: QGraphicsSvgItem , QGraphicsTextItem
注意
该类在 Qt4.6 引入
PySide.QtGui.QGraphicsObject class provides a base class for all graphics items that require signals, slots and properties.
类扩展 PySide.QtGui.QGraphicsItem with PySide.QtCore.QObject ‘s signal/slot and property mechanisms. It maps many of PySide.QtGui.QGraphicsItem ‘s basic setters and getters to properties and adds notification signals for many of them.
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 PySide.QtGui.QGraphicsObject inherits from both PySide.QtCore.QObject and PySide.QtGui.QGraphicsItem , you should use the functions provided by PySide.QtGui.QGraphicsItem , not PySide.QtCore.QObject , to manage the relationships between parent and child items.
The relationships between items can be explored using the PySide.QtGui.QGraphicsItem.parentItem() and PySide.QtGui.QGraphicsItem.childItems() functions. In the hierarchy of items in a scene, the PySide.QtGui.QGraphicsItem.parentObject() and PySide.QtGui.QGraphicsItem.parentWidget() functions are the equivalent of the QWidget.parent() and QWidget.parentWidget() 函数为 PySide.QtGui.QWidget 子类。
| 参数: | parent – PySide.QtGui.QGraphicsItem |
|---|
构造 PySide.QtGui.QGraphicsObject with parent .
| 参数: |
|
|---|
| 参数: | type – PySide.QtCore.Qt.GestureType |
|---|