From 7aabc22e0b6841a46eb449398e4e8910352008cc Mon Sep 17 00:00:00 2001 From: Sine Striker <trueful@163.com> Date: 周六, 09 12月 2023 15:10:23 +0800 Subject: [PATCH] Fix windows custom margins key mistake --- examples/mainwindow/mainwindow.cpp | 1 + src/core/contexts/win32windowcontext.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/examples/mainwindow/mainwindow.cpp b/examples/mainwindow/mainwindow.cpp index ce3d742..e0c7151 100644 --- a/examples/mainwindow/mainwindow.cpp +++ b/examples/mainwindow/mainwindow.cpp @@ -99,5 +99,6 @@ setMenuWidget(windowBar); setCentralWidget(clockWidget); setWindowTitle("Example MainWindow"); + // setContentsMargins({0, 1, 0, 0}); resize(640, 480); } diff --git a/src/core/contexts/win32windowcontext.cpp b/src/core/contexts/win32windowcontext.cpp index 9581b94..c475a62 100644 --- a/src/core/contexts/win32windowcontext.cpp +++ b/src/core/contexts/win32windowcontext.cpp @@ -289,7 +289,7 @@ #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) if (QPlatformWindow *platformWindow = window->handle()) { if (const auto ni = QGuiApplication::platformNativeInterface()) { - ni->setWindowProperty(platformWindow, QStringLiteral("_q_windowsCustomMargins"), + ni->setWindowProperty(platformWindow, QStringLiteral("WindowsCustomMargins"), marginsVar); } } -- Gitblit v1.9.1