summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-07-10 14:13:39 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-07-11 08:34:06 +0200
commitb4008713a2a6229de6d15b1f4050167bf6664e64 (patch)
treeb385e561418764b67d825deede2c25e55da6b0da /src
parentfa06a866b9319678663b901238f4b227a272c3e9 (diff)
Windows/ActiveQt: Pass native parent handle property from widget to widget window.
Task-number: QTBUG-31672 Task-number: QTBUG-32343 Change-Id: I6b1eca13248da06db739b1a8356a0259f7f4ae6c Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index dafe7dc42a..f0846bea6b 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -887,6 +887,10 @@ void QWidgetPrivate::deleteSysExtra()
}
+#ifdef Q_OS_WIN
+static const char activeXNativeParentHandleProperty[] = "_q_embedded_native_parent_handle";
+#endif
+
void QWidgetPrivate::createTLSysExtra()
{
Q_Q(QWidget);
@@ -897,6 +901,10 @@ void QWidgetPrivate::createTLSysExtra()
if (extra->maxw != QWIDGETSIZE_MAX || extra->maxh != QWIDGETSIZE_MAX)
extra->topextra->window->setMaximumSize(QSize(extra->maxw, extra->maxh));
#ifdef Q_OS_WIN
+ // Pass on native parent handle for Widget embedded into Active X.
+ const QVariant activeXNativeParentHandle = q->property(activeXNativeParentHandleProperty);
+ if (activeXNativeParentHandle.isValid())
+ extra->topextra->window->setProperty(activeXNativeParentHandleProperty, activeXNativeParentHandle);
if (q->inherits("QTipLabel") || q->inherits("QAlphaWidget"))
extra->topextra->window->setProperty("_q_windowsDropShadow", QVariant(true));
#endif