From b171db2925657748ae816401aa300a13811c445e Mon Sep 17 00:00:00 2001
From: Zhao Yuhang <2546789017@qq.com>
Date: 周六, 13 4月 2024 19:25:09 +0800
Subject: [PATCH] update qmsetup

---
 README.md |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md
index 39a33fa..7deff56 100644
--- a/README.md
+++ b/README.md
@@ -134,6 +134,21 @@
 
 ### Qt Widgets Application
 
+#### Initialization
+
+The following initialization should be done before any widget constructs.
+
+```cpp
+#include <QWKQuick/qwkquickglobal.h>
+
+int main(int argc, char *argv[])
+{
+    QGuiApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings)
+    
+    // ...
+}
+```
+
 #### Setup Window Agent
 
 First, setup `WidgetWindowAgent` for your top `QWidget` instance. (Each window needs its own agent.)
@@ -255,6 +270,13 @@
 + QWindowKit Internals [TODO]
 + [FramelessHelper Related](docs/framelesshelper-related.md)
 
+
+### Vulnerabilities
+
++ Once you have made the window frameless, it will not be able to switch back to the system border.
++ There must not be any internal child widget with `Qt::WA_NativeWindow` property enabled, otherwise the native features and display may be abnormal. Therefore, do not set any widget that has called `QWidget::winId()` or `QWidget::setAttribute(Qt::WA_NativeWindow)` as a descendant of a frameless window.
+    + If you really need to move widgets between different windows, make sure that the widget is not a top-level window and wrap it with a frameless container.
+
 ## TODO
 
 + Fix 5.15 window abnormal behavior

--
Gitblit v1.9.1