QGraphicsObject
继承自QGraphicsItem
and QObject
,但与大多数 QObject 子类不同,QGraphicsObject 的构造函数没有QObject *parent
参数。
那么这是否意味着我应该在构造函数中提供这样的参数,当我对它进行子类化甚至使用setParent
方法来具有自动销毁功能时?
PS:我有 Qt 5
QGraphicsObject
继承自QGraphicsItem
and QObject
,但与大多数 QObject 子类不同,QGraphicsObject 的构造函数没有QObject *parent
参数。
那么这是否意味着我应该在构造函数中提供这样的参数,当我对它进行子类化甚至使用setParent
方法来具有自动销毁功能时?
PS:我有 Qt 5