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. Is it possible to change color of Windows menu bar in Qt window?
Forum Updated to NodeBB v4.3 + New Features

Is it possible to change color of Windows menu bar in Qt window?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 280 Views 1 Watching
  • 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.
  • C Offline
    C Offline
    CuriousPan
    wrote on last edited by
    #1

    I'm working on adding dark theme to my application and I wonder if it's possible also to change the color of windows menu bar?

    48e7b00c-dbdb-48b7-8abc-42d9e1fc27f0-image.png

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      It's possible but you need to go platform-specific and use native code and native APIs.

      A different approach would be to disable the native bar and draw it yourself, here's a small blog post about it: https://www.qt.io/blog/custom-window-decorations

      (Z(:^

      1 Reply Last reply
      3
      • J Offline
        J Offline
        junzhe fan
        wrote on last edited by
        #3

        I did that before, you can create a QWidget and add three QPushbuttons as child widgets to serve as Close, minimize, maximize, then obviously you need to overwrite the QmouseEvent to make the UI to behave like a normal window. Finally, just call setMenuBar() method on the MainWindow

        1 Reply Last reply
        0

        • Login

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