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>
This commit is contained in:
Friedemann Kleint 2013-07-10 14:13:39 +02:00 committed by The Qt Project
parent fa06a866b9
commit b4008713a2

View File

@ -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