| | |
| | | |
| | | Cross-platform window customization framework for Qt Widgets and Qt Quick. |
| | | |
| | | This project inherited most of [wangwenx190 FramelessHelper](https://github.com/wangwenx190/framelesshelper) |
| | | implementation, with a complete refactoring and upgrading of the architecture. |
| | | This project inherited the major implementations from [wangwenx190 FramelessHelper](https://github.com/wangwenx190/framelesshelper), with a complete refactoring and upgrading of the architecture. |
| | | |
| | | Feature requests are welcome. |
| | | |
| | | ## Join with Us :triangular_flag_on_post: |
| | | ## Stay In Touch :triangular_flag_on_post: |
| | | |
| | | You can join our [Discord channel](https://discord.gg/grrM4Tmesy). You can share your findings, thoughts and ideas on improving / implementing FramelessHelper functionalities on more platforms and apps! |
| | | You can share your findings, thoughts and ideas on improving / implementing QWindowKit functionalities on more platforms and apps! |
| | | |
| | | - Chat with us on [Discord](https://discord.gg/grrM4Tmesy) |
| | | - 中文用户可加入 QQ 群 876419693 |
| | | |
| | | ## Supported Platforms |
| | | |
| | |
| | | cd qwindowkit |
| | | |
| | | cmake -B build -S . \ |
| | | -Dqmsetup_DIR=<dir> \ # Optional |
| | | -DCMAKE_PREFIX_PATH=<QT_DIR> \ |
| | | -Dqmsetup_DIR=<dir> \ # Optional |
| | | -DQWINDOWKIT_BUILD_QUICK=TRUE \ # Optional |
| | | -DCMAKE_INSTALL_PREFIX=/path/install \ |
| | | -G "Ninja Multi-Config" |
| | | |
| | | cmake --build build --target install --config Debug --parallel |
| | | cmake --build build --target install/strip --config Release --parallel |
| | | cmake --build build --target install --config Debug |
| | | cmake --build build --target install --config Release |
| | | ``` |
| | | Read the root `CMakeLists.txt` for more build options. |
| | | |
| | | You can also include this directory as a subproject if you choose CMake as your build system. |
| | | |
| | | For other build systems, you need to install with CMake first and include the corresponding configuration files in your project. |
| | |
| | | |
| | | #### Visual Studio Project |
| | | |
| | |  |
| | | |
| | | First, click the "View" menu, find "Other Windows", click "Property Manager". |
| | | |
| | |  |
| | | |
| | | Then, right click the project name item and pop up a context menu, click "Add |
| | | Existing Property Sheet...". |
| | | |
| | |  |
| | | |
| | | Finally, find the "QWindowKit.props" in the "[Build output folder of |
| | | QWindowKit]\share\QWindowKit" folder, click "Open" button. |
| | | See [Visual Studio Guide](./docs/visual-studio-guide.md) for detailed usages. |
| | | |
| | | ## Quick Start |
| | | |
| | |
| | | - Once you have made the window frameless, it will not be able to switch back to the system frame again unless you destroy your window and recreate it with different settings. |
| | | |
| | | #### Native Child Widget |
| | | - 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 window. |
| | | - If you are about to add a widget with `Qt::WA_NativeWindow` property enabled as a descendent of the frameless window, you should enable `Qt::WA_DontCreateNativeAncestors` of it in advance. |
| | | |
| | | #### Size Constrains |
| | | - If you want to disable window resizing, you can set a fixed size, which is officially supported by QWindowKit. If you use other special means to achieve this, QWK doesn't guarantee everything can still be fully functional. |
| | | - If you set a maximized width or height, the window should not be maximized because you cannot get the correct window size through Qt APIs. You may workaround this by using system APIs such as `GetWindowRect` or `GetClientRect`. The root cause lies deep in Qt QPA implementations and currently we don't know how to fix it without modifying Qt itself. |
| | | |
| | | #### Windows 10 |
| | | |
| | | - Due to the inherent defects in the Windows 10 window system, the top border will disappear when the system title bar is removed. We have filtered Qt's event and perfectly reshown the system top border, thanks to the implementation of Windows Terminal for our reference. However, this workaround only works with QtWidgets and QtQuick (**only when rendering through D3D**) applications. |
| | | |
| | | - In QtQuick applications that use OpenGL or other rendering backends, we use Qt's painting system to emulate this border. But since Windows 10 system border is translucent, the difference from the system border is more noticeable in a dark background. |
| | | |
| | | ## TODO |