QCustomEvent Class

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 ().