From c9261fbd7019264e8543507e3afaec63d55595a2 Mon Sep 17 00:00:00 2001
From: Yuhang Zhao <zhaoyuhang@rankyee.com>
Date: 周三, 06 12月 2023 10:58:07 +0800
Subject: [PATCH] fix stupid code

---
 src/widgets/widgetwindowagent.cpp |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/widgets/widgetwindowagent.cpp b/src/widgets/widgetwindowagent.cpp
index 73a4334..8f4a76d 100644
--- a/src/widgets/widgetwindowagent.cpp
+++ b/src/widgets/widgetwindowagent.cpp
@@ -32,8 +32,10 @@
             return false;
         }
 
-        std::ignore = w->winId(); // Make sure the window handle is created
-        if (!d->setup(w->windowHandle(), new WidgetItemDelegate())) {
+        w->setAttribute(Qt::WA_DontCreateNativeAncestors);
+        w->setAttribute(Qt::WA_NativeWindow);
+
+        if (!d->setup(w, new WidgetItemDelegate())) {
             return false;
         }
         d->hostWidget = w;

--
Gitblit v1.9.1