Python Forum
[PyQt] Help: how to set QDialog title bar color
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] Help: how to set QDialog title bar color
#1
Is there a way to set the color of a QDialog title bar in PyQt/Pyside2?

I am currently busy with setting up a GUI. I am using different color schemes for the GUI which the user can select from a drop down menu, but I cannot find a way to set the color of the title bar. Is this possible?
Reply
#2
The title bar is not part of the window. It is a decoration added on by the desktop. There may be ways to change the window frame, but it is outside the realm of Qt.

If you really want to do this the best approach may be to make windows without frames and create your own frame decorations. This could be done using Qt. A downside of this approach is your program becomes the window manager for your windows. You have to handle iconify and move and resize events. It is a lot of work just to have nice frame colors.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020