The QCustomEvent class provides support for custom events. 更多...
| 头: | #include <QCustomEvent> |
| 继承: | QEvent |
The QCustomEvent class provides support for custom events.
QCustomEvent
拥有
void *
that can be used to store custom data.
In Qt 3,
QObject::customEvent
() took a
QCustomEvent
pointer. We found out that this approach was unsatisfactory, because there was often no safe way of deleting the data held in the
void *
.
In Qt 4, QObject::customEvent () takes a plain QEvent pointer. You can add custom data by subclassing.
另请参阅 QObject::customEvent () 和 QCoreApplication::notify ().