Qt:Документация 4.3.2/qcustomevent

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

Главная · Все классы · Основные классы · Классы по группам · Модули · Функции

Image:trolltech-logo.png

[править] QCustomEvent Class Reference
[модуль QtCore ]

The QCustomEvent class provides support for custom events. Далее...

 #include <QCustomEvent>

This class is part of the Qt 3 support library. It is provided to keep old source code working. Мы настоятельно не рекомендуем использовать этот класс в новом коде. See Porting to Qt 4 for more information.

Inherits QEvent.

[править] Дополнительные унаследованные члены

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

[править] Подробное описание

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



Copyright © 2007 Trolltech Trademarks
Qt 4.3.2