This commit totally removed the dependency of the widgets
and quick modules for the Windows platform. Now the library
itself only depends on the core and gui modules. Currently
no bug can be found. But there are some side effects: one is
we can't set a palette for a widget due to we can't access
QWidget specific functions so if you want to enable blur
effect, you will have to do this by yourself. Another one is
you now have to pass the window handle to WinNativeEventFilter
instead of the pointer of a QObject. Before this patch, I'm
using QWidget::winId() to get the window handle, now we have
get rid of the widgets dependency so I can't get the window
handle now, you have to pass it explicitly. And it leads to
huge refactoring of the whole repository. But I think it's
worth doing. If anyone knows how to get the window handle
without introducing new dependencies, please tell me. It will
help me a lot.
To remove the quick dependency, the FramelessQuickHelper class
is moved out of the library now. If your project needs it,
please copy the files to your project and include them directly.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
The startSystemMove and startSystemResize may
return false on some systems, just fallback to
use the old way to move and resize the window.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
1. Use QList instead of QVector because QVector will become an alias of QList since Qt6.
2. Don't use *const because the account of const is too large.
3. New style applied, by Clang Format.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
If a window is in fullscreen mode, it should not have a title bar.
Maybe a rare use case, but better than nothing.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>