Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Style application bar (the top bar of a floating window) which has the close and minimize buttons

Style application bar (the top bar of a floating window) which has the close and minimize buttons

Scheduled Pinned Locked Moved Solved General and Desktop
closeminimizewindows10windowstylesheet
3 Posts 3 Posters 475 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hologram
    wrote on 28 Jan 2023, 10:34 last edited by Hologram
    #1

    Hi, I was wondering, can I style the OS's windowed application bar using stylesheets?
    a03381f9-905e-492a-91a7-1a1a9d025093-afbeelding.png
    It is currently white, but it would be better if I could make it dark for a true dark mode experience.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 28 Jan 2023, 10:43 last edited by
      #2

      Hi
      Its drawn by the OS and you cannot style it. :)

      1 Reply Last reply
      1
      • S Offline
        S Offline
        SimonSchroeder
        wrote on 30 Jan 2023, 07:58 last edited by
        #3

        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.

        1 Reply Last reply
        1

        1/3

        28 Jan 2023, 10:34

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved