diff options
Diffstat (limited to 'src/widgets/dialogs/qwizard_win.cpp')
-rw-r--r-- | src/widgets/dialogs/qwizard_win.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/widgets/dialogs/qwizard_win.cpp b/src/widgets/dialogs/qwizard_win.cpp index 5a666b542b..8edbe14150 100644 --- a/src/widgets/dialogs/qwizard_win.cpp +++ b/src/widgets/dialogs/qwizard_win.cpp @@ -43,7 +43,8 @@ #include "qwizard_win_p.h" #include <private/qapplication_p.h> -#include <qpa/qplatformnativeinterface.h> +#include <qpa/qplatformwindow.h> +#include <qpa/qplatformwindow_p.h> #include "qwizard.h" #include "qpaintengine.h" #include "qapplication.h" @@ -166,6 +167,8 @@ QVistaHelper::~QVistaHelper() void QVistaHelper::updateCustomMargins(bool vistaMargins) { + using namespace QPlatformInterface::Private; + if (QWindow *window = wizard->windowHandle()) { // Reduce top frame to zero since we paint it ourselves. Use // device pixel to avoid rounding errors. @@ -176,11 +179,8 @@ void QVistaHelper::updateCustomMargins(bool vistaMargins) // The dynamic property takes effect when creating the platform window. window->setProperty("_q_windowsCustomMargins", customMarginsV); // If a platform window exists, change via native interface. - if (QPlatformWindow *platformWindow = window->handle()) { - QGuiApplication::platformNativeInterface()-> - setWindowProperty(platformWindow, QStringLiteral("WindowsCustomMargins"), - customMarginsV); - } + if (auto platformWindow = dynamic_cast<QWindowsWindow *>(window->handle())) + platformWindow->setCustomMargins(customMarginsDp); } } |