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. Customize Titlebar

Customize Titlebar

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 12.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.
  • F Offline
    F Offline
    FredeHo
    wrote on last edited by
    #1

    Hey guys,
    I want to customize my titlebar of my qmainwindow. For example change color and change the appearence of the buttons.
    As far as I know the only way to accomplish that is to make the qmainwindow frameless and fake my own titlebar.
    The problem is that I want to start the window maximized. When I do this I'm not able to access the Taskbar of windows 7/8 anymore. I tried many possible window flag combinations but none of them seem to work.
    Any suggestions? Thanks!

    1 Reply Last reply
    0
    • Chris KawaC Online
      Chris KawaC Online
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      It's not that simple and this topic was discussed in the forum many times. When you disable the window manager provided frame you basically disable all the frame related features OS does for you and you need to "fake" these too. This includes mouse/touch/keyboard input, resize, aero snap/shake, minimize/maximize and window positioning.

      There's no portable way to do that and you need to handle these in the nativeEvent() and play with OS api (WinAPI in case of Windows).
      See "this post":http://qt-project.org/forums/viewthread/26640 to see some code required, although note that the code presented there is very far from complete.

      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