QCustomEvent Class

The QCustomEvent class provides support for custom events. More...

Header: #include <QCustomEvent>
Inherits: QEvent

Additional Inherited Members

  • 1 property inherited from QEvent
  • 6 public functions inherited from QEvent
  • 1 static public member inherited from QEvent

Detailed Description

The QCustomEvent class provides support for custom events.

QCustomEvent has a 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.

See also QObject::customEvent() and QCoreApplication::notify().

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.