summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qabstractnativeeventfilter.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-09-21 07:14:33 +0200
committerLiang Qi <liang.qi@qt.io>2016-09-21 07:14:40 +0200
commitd10e4c193b0152350e884adcc1060aabd1a974f7 (patch)
tree23b553e40575d4660709fe8765dcb77e3625103d /src/corelib/kernel/qabstractnativeeventfilter.cpp
parent8d64d1e0c3f7ebcee859e8b5f40aa27a8df86351 (diff)
parent25e9bde2d665866f7a9a40d1ed3aa8fabcf2ac2f (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Diffstat (limited to 'src/corelib/kernel/qabstractnativeeventfilter.cpp')
-rw-r--r--src/corelib/kernel/qabstractnativeeventfilter.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/corelib/kernel/qabstractnativeeventfilter.cpp b/src/corelib/kernel/qabstractnativeeventfilter.cpp
index 351657d42c..dcbb92f044 100644
--- a/src/corelib/kernel/qabstractnativeeventfilter.cpp
+++ b/src/corelib/kernel/qabstractnativeeventfilter.cpp
@@ -96,14 +96,25 @@ QAbstractNativeEventFilter::~QAbstractNativeEventFilter()
In both cases, the \a message can be casted to a MSG pointer.
The \a result pointer is only used on Windows, and corresponds to the LRESULT pointer.
- On Mac, \a eventType is set to "mac_generic_NSEvent", and the \a message can be casted to an EventRef.
+ On macOS, \a eventType is set to "mac_generic_NSEvent", and the \a message can be casted to an NSEvent pointer.
In your reimplementation of this function, if you want to filter
the \a message out, i.e. stop it being handled further, return
true; otherwise return false.
- Example:
+ \b {Linux example}
\snippet code/src_corelib_kernel_qabstractnativeeventfilter.cpp 0
+
+ \b {macOS example}
+
+ mycocoaeventfilter.h:
+ \snippet code/src_corelib_kernel_qabstractnativeeventfilter.h 0
+
+ mycocoaeventfilter.mm:
+ \snippet code/src_corelib_kernel_qabstractnativeeventfilter.mm 0
+
+ myapp.pro:
+ \snippet code/src_corelib_kernel_qabstractnativeeventfilter.pro 0
*/
QT_END_NAMESPACE