tags:

views:

140

answers:

2

Is any posibility to add widgets in titlebar of QMainWindow?

I try to avoid "emulate" a title bar by making a custom widget for that and hiding the default title bar (from Qt::WindowFlags).

I am using QT 4.5 or 4.6 beta.

A: 

You can create your custom widget with the Qt::WindowFlag::ToolTip flag and handle the position manually.

gregseth
+3  A: 

You cannot. What you can do is to create a completely custom window by hinting that you don't want a title bar using a Qt::WindowFlag. Notice - these flags are hints and not settings. Then you can create your own title bar and add whatever you like to it.

Also, notice, this will make your application harder to move between platforms. On the X11 side, you will even have to test against different window managers as they sometimes treat hints differently.

e8johan
This is what I was afraid of...
Cătălin Pitiș