From a06b98be0772fe501f66af302ea809079de5ded0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 13 Oct 2020 16:00:59 +0200 Subject: doc: Add native event handling docs Change-Id: Ia862c57a04c0ed978bdcbdfd5cc29b67b5ea59d1 Reviewed-by: Paul Wicking --- doc/src/platformintegration/platformintegration.qdoc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/src/platformintegration/platformintegration.qdoc b/doc/src/platformintegration/platformintegration.qdoc index 54d6b594..7ae5aa06 100644 --- a/doc/src/platformintegration/platformintegration.qdoc +++ b/doc/src/platformintegration/platformintegration.qdoc @@ -76,6 +76,21 @@ this QWindow into a Qt Widget based UI, use the widgets-specific QWidget::createWindowContainer() function. + \section1 Event Handling + + Most event handling use-cases in Qt are sufficiently covered by the cross + platform event delivery, via QWindow::event() and friends, or through + QObject::installEventFilter(). + + In cases where this is not enough, Qt provides access to the delivery of the + native events. A global event filter that receives all native events can be + installed by using QCoreApplication::installNativeEventFilter(), while + per-window native events can be handled in QWindow::nativeEvent(). + + \note Interfering with the native event flow may put Qt in an inconsistent + state. These APIs should primarily be used to augment Qt's existing + event handling, for example for events Qt doesn't handle yet. + \section1 Native Interfaces \section1 Platform Support -- cgit v1.2.1