diff options
author | Albert Astals Cid <albert.astals@canonical.com> | 2015-09-10 17:34:56 +0200 |
---|---|---|
committer | Albert Astals Cid <albert.astals@canonical.com> | 2015-09-23 15:59:39 +0000 |
commit | 0396c7a7d89b0813b997076a52c3f29fb3a0e919 (patch) | |
tree | c9f6480700517425915b152b3fced2477b5f7648 /src/corelib/kernel | |
parent | 867fc30c7c9be51b4b3813d2cc558b5a9df0256d (diff) |
Doc: Mention that calling parent class event() is important
If you don't deleteLater and more won't work
Change-Id: I47cbb24f8e22a7f269a0297410e4163878819f82
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qobject.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 7f95b6a591..d324b6f150 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -1219,6 +1219,13 @@ void QObject::setObjectName(const QString &name) The event() function can be reimplemented to customize the behavior of an object. + Make sure you call the parent event class implementation + for all the events you did not handle. + + Example: + + \snippet code/src_corelib_kernel_qobject.cpp 52 + \sa installEventFilter(), timerEvent(), QCoreApplication::sendEvent(), QCoreApplication::postEvent() */ |