Last active
November 11, 2018 03:55
-
-
Save Longhanks/e3be3207d5d584ed9eeecdef904d4ffa to your computer and use it in GitHub Desktop.
fix_native_window
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
target_include_directories(<target> PRIVATE ${Qt5Gui_PRIVATE_INCLUDE_DIRS}) | |
Q_DECLARE_METATYPE(QMargins) | |
#include <qpa/qplatformwindow.h> | |
#include <qpa/qplatformnativeinterface.h> | |
QVariant v = qVariantFromValue(QMargins{-8, -30, -8, -8}); | |
native_window->windowHandle()->setProperty("_q_windowsCustomMargins", v); | |
QGuiApplication::platformNativeInterface()->setWindowProperty( | |
native_window->windowHandle()->handle(), QStringLiteral("WindowsCustomMargins"), v); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment