From c06bb37630a3ca79dc1992ab25cf65455c261978 Mon Sep 17 00:00:00 2001
From: Sine Striker <trueful@163.com>
Date: 周一, 06 5月 2024 19:30:56 +0800
Subject: [PATCH] Update metadata

---
 README.md |   54 ++++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 42 insertions(+), 12 deletions(-)

diff --git a/README.md b/README.md
index 97cf4fa..ba19b1c 100644
--- a/README.md
+++ b/README.md
@@ -46,7 +46,7 @@
 |:---------:|:-----------:|:-------------------------:|
 |    Qt     |   \>=5.12   | Core, Gui, Widgets, Quick |
 | Compiler  |  \>=C++17   |   MSVC 2019, GCC, Clang   |
-|   CMake   |   \>=3.17   |   >=3.20 is recommended   |
+|   CMake   |   \>=3.19   |   >=3.20 is recommended   |
 
 ### Tested Compilers
 
@@ -68,7 +68,10 @@
 ### Build & Install
 
 ```sh
-cmake -B build \
+git clone --recursive https://github.com/stdware/qwindowkit
+cd qwindowkit
+
+cmake -B build -S . \
   -Dqmsetup_DIR=<dir> \ # Optional
   -DCMAKE_INSTALL_PREFIX=/path/install \
   -G "Ninja Multi-Config"
@@ -87,7 +90,7 @@
 #### CMake Project
 
 ```sh
-cmake -B build -DQWindowKit_DIR=/path/install/cmake/QWindowKit
+cmake -B build -DQWindowKit_DIR=/path/install/lib/cmake/QWindowKit
 ```
 
 ```cmake
@@ -113,6 +116,21 @@
 ## Quick Start
 
 ### Qt Widgets Application
+
+#### Initialization
+
+The following initialization should be done before any widget constructs.
+
+```cpp
+#include <QtWidgets/QApplication>
+
+int main(int argc, char *argv[])
+{
+    QGuiApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings)
+    
+    // ...
+}
+```
 
 #### Setup Window Agent
 
@@ -162,13 +180,11 @@
 agent->setSystemButton(QWK::WindowAgentBase::Close, myTitleBar->closeButton());
 ```
 
-Doing this does not mean that these buttons' click events are automatically associated with window actions, you still
-need to manually connect the signals and slots to emulate the native window behaviors.
+Doing this does not mean that these buttons' click events are automatically associated with window actions, you still need to manually connect the signals and slots to emulate the native window behaviors.
 
 On macOS, this step can be skipped because it is better to use the buttons provided by the system.
 
-Last but not least, set hit-test visible hint to let `WidgetWindowAgent` know other widgets that desire to receive mouse
-events.
+Last but not least, set hit-test visible hint to let `WidgetWindowAgent` know other widgets that desire to receive mouse events.
 
 ```c++
 agent->setHitTestVisible(myTitleBar->menuBar(), true);
@@ -222,7 +238,8 @@
         window.visible = true
     }
     WindowAgent {
-      // ...
+        id: windowAgent
+        // ...
     }
 }
 ```
@@ -233,22 +250,35 @@
 
 See [examples](examples) for more demo use cases. The examples have no High DPI support.
 
++ 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
-+ Support Mac style change notification
-+ Support Mac system buttons customization for Quick
 + More documentations
 + When do we support Linux native features?
 
 ## Special Thanks
 
-+ [Arabaku](https://github.com/Arabaku)
 + [Maplespe](https://github.com/Maplespe)
 + [zhiyiYo](https://github.com/zhiyiYo)
 
 ## License
 
-QWindowKit is licensed under the Apache 2.0 License.
\ No newline at end of file
+QWindowKit is licensed under the [Apache 2.0 License](./LICENSE).
+
+<!--
+
+**You MUST keep a copyright notice of QWindowKit in a prominent place on your project, such as the README document and the About Dialog.**
+
+**You MUST NOT remove the license text from the header files and source files of QWindowKit.**
+
+-->

--
Gitblit v1.9.1