Solved Style application bar (the top bar of a floating window) which has the close and minimize buttons
-
Hi, I was wondering, can I style the OS's windowed application bar using stylesheets?
It is currently white, but it would be better if I could make it dark for a true dark mode experience. -
Hi
Its drawn by the OS and you cannot style it. :) -
Hi
Its drawn by the OS and you cannot style it. :) -
Well, Qt does not provide these capabilities. This means that you cannot easily use stylesheets for this purpose. However, there might be OS-specific ways to change the color of the title bar. On Windows (10 and later) you can use DwmSetWindowAttribute to enable dark mode for the title bar. Another way is to get a window without decoration/borders from the OS and then draw the entire title bar yourself using Qt. Then, you can also style the title bar using stylesheets. It might get a little complicated to draw the close and minimize buttons in the correct OS style yourself.