Custom Paint QMainWindow title bar

Does anyone know how I can customize the title bar of the main window in QT? I would like to make a regular picture over a “regular” picture.

The QT question that interests me is 4.5 or 4.6 (beta)

+4
source share
3 answers

Actually, the title bar is part of what the window manager adds. It could be Windows, OS X, or anything you use in an X11 environment. In any case, you need to remove the panel and replace it with your own. To do this, use Qt :: WindowFlags ( http://doc.qt.digia.com/4.5/qt.html#WindowType-enum ) to remove the title. This, however, makes your application platform-sensitive and, in X11, a window manager. You can only hint that you want to have a window without a title ...

+6
source

It seems you are looking for QSkinObject from Kernel_Panic:

http://www.qt-apps.org/content/show.php?action=content&content=67309

Works well several times when I tested it.

+1
source

Try looking at the style sheets ... There are examples of how to customize the QDockWidget title bar in QtAssistant ... (Look for the "Style Sheet", then select "Customize QDockWidget" in the tree) ...

If you haven't found anything, perhaps overriding QMainwindow?

Hope this helps a bit ...

0
source

All Articles