| | |
| | | |:---------:|:-----------:|:-------------------------:| |
| | | | 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 |
| | | |
| | |
| | | |
| | | ## Integrate |
| | | |
| | | ### Configure Options |
| | | |
| | | + `QWINDOWKIT_BUILD_DOCUMENTATIONS` |
| | | + If you have installed `Doxygen`, you can **enable** this option so that the documentations will also be built and installed. |
| | | + If not, you can read the comments in *qdoc* style in `cpp` files to get detailed usages of the public APIs. |
| | | |
| | | + `QWINDOWKIT_ENABLE_WINDOWS_SYSTEM_BORDERS` |
| | | + If you don't want the system borders on Windows 10/11, you can **disable** this option. |
| | | + If so, the Windows 10 top border issue will disappear. However, part of the client edge area will be occupied as the resizing margins. |
| | | |
| | | + `QWINDOWKIT_ENABLE_QT_WINDOW_CONTEXT` |
| | | + If you want to use pure Qt emulated frameless implementation, you can **enable** this option. |
| | | + If so, all system native features will be lost. |
| | | |
| | | + `QWINDOWKIT_ENABLE_STYLE_AGENT` |
| | | + Select whether to exclude the style component by **disabling** this option according to your requirements and your Qt version. |
| | | |
| | | ### 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" |
| | |
| | | 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); |
| | |
| | | window.visible = true |
| | | } |
| | | WindowAgent { |
| | | // ... |
| | | id: windowAgent |
| | | // ... |
| | | } |
| | | } |
| | | ``` |
| | |
| | | |
| | | See [examples](examples) for more demo use cases. The examples have no High DPI support. |
| | | |
| | | + QWindowKit Internals [TODO] |
| | | + [FramelessHelper Related](docs/framelesshelper-related.md) |
| | | |
| | | ## 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. |
| | | 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.** |
| | | |
| | | --> |