Jorgen-VikingGod / Qt-Frameless-Window-DarkStyle

simple MainWindow class implementation with frameless window and custom dark style. It adds also support for titlebar and buttons (minimize, maximize, close)
1.14k stars 272 forks source link

doesnt work on Qt 5.15.* #47

Closed kanor closed 3 years ago

kanor commented 3 years ago

The style breaks up with Qt 5.15

qt-everywhere-src-5.15.2.tar.xz Linux 5.8.0-49-generic #55~20.04.1-Ubuntu SMP Fri Mar 26 01:01:07 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux screenshot_linux_frameless_windows_qt_dark_style_enabled png

kanor commented 3 years ago

Commenting out the standard palette initialization solves the problem.

`diff --git a/main.cpp b/main.cpp index 9552ef3..a55ac69 100644 --- a/main.cpp +++ b/main.cpp @@ -21,7 +21,7 @@ int main(int argc, char *argv[]) {

// style our application with custom dark style QApplication::setStyle(new DarkStyle);

Teddy-van-Jerry commented 3 years ago

Yes, that also works on Qt 6.1!