summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qapplication_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel/qapplication_p.h')
-rw-r--r--src/widgets/kernel/qapplication_p.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h
index 75cc003a1d..c4a9a15064 100644
--- a/src/widgets/kernel/qapplication_p.h
+++ b/src/widgets/kernel/qapplication_p.h
@@ -59,6 +59,9 @@
#include "QtGui/qfont.h"
#include "QtGui/qcursor.h"
#include "QtGui/qregion.h"
+#include "QtGui/qwindow.h"
+#include "qwidget.h"
+#include "QtGui/qplatformnativeinterface_qpa.h"
#include "QtCore/qmutex.h"
#include "QtCore/qtranslator.h"
#include "QtCore/qbasictimer.h"
@@ -512,6 +515,13 @@ public:
#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) || defined(Q_WS_MAC) || defined(Q_WS_QPA)
void sendSyntheticEnterLeave(QWidget *widget);
#endif
+#ifdef Q_OS_WIN
+ static HWND getHWNDForWidget(QWidget *widget)
+ {
+ QWindow *window = qobject_cast<QWindow *>(widget);
+ return static_cast<HWND> ("handle", QGuiApplication::platformNativeInterface()->nativeResourceForWindow("handle", window));
+ }
+#endif
#ifndef QT_NO_GESTURES
QGestureManager *gestureManager;