diff options
author | Olli Werwolff <qt-info@nokia.com> | 2011-07-07 09:07:19 +0200 |
---|---|---|
committer | Oliver Wolff <oliver.wolff@nokia.com> | 2011-07-07 14:20:07 +0200 |
commit | f9f04ea63d2489bd2ecb91c5a6bee4c4a869ac20 (patch) | |
tree | 5914b51c5bbe09f7e191d3a4d6ae52092225697f /src/widgets/kernel/qapplication_p.h | |
parent | d677aac93443a8e57955e4a0b9f09368090f6848 (diff) |
Use PlatformNativeInterface to obtain handles
Change-Id: I8cdf3d5477e72e89bcde46ccb6670320bf4dd797
Reviewed-on: http://codereview.qt.nokia.com/1270
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/widgets/kernel/qapplication_p.h')
-rw-r--r-- | src/widgets/kernel/qapplication_p.h | 10 |
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; |