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. How to create a custom-styled Qt window with non-native menu and title bar?
Forum Updated to NodeBB v4.3 + New Features

How to create a custom-styled Qt window with non-native menu and title bar?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 327 Views 2 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.
  • Y Offline
    Y Offline
    YJMForgive
    wrote on last edited by
    #1

    I recently came across a Qt application with a custom UI design that caught my attention. I'd like to understand how to achieve a similar look for my own QWidget application.

    Specifically, I'm interested in learning:

    1. How to customize the menu bar to look different from the Windows native menu
    2. How to modify/style the window title bar
    3. The general approach to achieving this modern, custom look in Qt

    Here is how it looks.
    alt text

    Pl45m4P 1 Reply Last reply
    0
    • Y YJMForgive

      I recently came across a Qt application with a custom UI design that caught my attention. I'd like to understand how to achieve a similar look for my own QWidget application.

      Specifically, I'm interested in learning:

      1. How to customize the menu bar to look different from the Windows native menu
      2. How to modify/style the window title bar
      3. The general approach to achieving this modern, custom look in Qt

      Here is how it looks.
      alt text

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @YJMForgive said in How to create a custom-styled Qt window with non-native menu and title bar?:

      1. How to customize the menu bar to look different from the Windows native menu
      2. How to modify/style the window title bar

      Both not possible using Qt only... you need a platform-specific approach for that

      1. The general approach to achieving this modern, custom look in Qt

      That's easy... probably "just" a dark theme stylesheet.
      You can define your own set depending on your taste or download existing ones for example here:

      • https://qss-stock.devsecstudio.com/
      • https://github.com/keshav-sahu7/qt-dark-theme
      • https://github.com/GTRONICK/QSS
      • https://github.com/Alexhuszagh/BreezeStyleSheets
      • https://github.com/catppuccin/qtcreator

      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      2
      • S Offline
        S Offline
        SimonSchroeder
        wrote on last edited by
        #3

        I am not even sure if Windows itself allows to style the title bar. By default the title bar belongs to the OS and you can only set the title and the icon.

        I guess the most common way (especially with Qt) is to create a Window without a title bar (by setting the proper window flags) and then providing your own title bar. This also means that you need to provide the 3 buttons on the top right yourself. You also have to implement the behavior of these 3 buttons and you have to implement dragging the window by dragging the title bar.

        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