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. QMainWindow Titile Background Color or Opacity
Forum Updated to NodeBB v4.3 + New Features

QMainWindow Titile Background Color or Opacity

Scheduled Pinned Locked Moved Solved General and Desktop
qmainwindow
2 Posts 2 Posters 8.4k 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.
  • O Offline
    O Offline
    Ongsk
    wrote on last edited by
    #1

    ![alt text](image url)0_1529933437745_screen.png

    How do I make the title bar to transparent or change it to any color? It look awkward with a white background.

    A 1 Reply Last reply
    0
    • O Ongsk

      ![alt text](image url)0_1529933437745_screen.png

      How do I make the title bar to transparent or change it to any color? It look awkward with a white background.

      A Offline
      A Offline
      ambershark
      wrote on last edited by
      #2

      @Ongsk Title bar decorations are managed by your window manager. You can change them (at a user level only) by changing your theme. This applies to osx, linux, and windows.

      If you want to force a specific color then you could make a window with a custom title bar and draw it however you want. Things like Chrome do this. Then they have an option to "use system title bar and borders".

      IMO, unless you are making a fully custom window like a video game launcher, or splash screen, or something like that you should let the window manager decorate the window. People customize their WMs to look how they like and standard looks are a foundation of GUI development.

      Here's a post from @mrjj that shows you how to do it in windows with native calls (Qt doesn't have a call for it) in case you insist on forcing a color on your users. https://forum.qt.io/topic/85837/change-window-title-bar-color-in-windows
      Keep in mind that will be for windows only so if you compile for linux or osx it will not work.

      My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

      1 Reply Last reply
      3

      • Login

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