PDA

View Full Version : Design Title bar for QWidet



DURGAPRASAD NEELAM
25th May 2015, 19:11
I want customized title bar for my QWidget.
I have seen setTitleBarWidget(QWidget* ), but this is only for QDockWidget, I want it for QWidget.

I want a window something like Qt result window (where we can see search result, Application output etc....). I want to design same window.
Any suggestions how to achieve this. I am using Qt4.8.6 on SLES11 machine.


My window should be with:
-light black colored Title bar with 3 pushButtons on left side, minimize and close buttons on right side. (Not able to attach screenshot for some reason)
-below with usual white space for other functionality.

2) In Qt result window (please excuse me if this is not relevant name for this window) minimize button is some thing different ( ^ ), is this Icon available in Qt standard icons ?

ChrisW67
25th May 2015, 21:13
What is the "Qt result window"?

DURGAPRASAD NEELAM
26th May 2015, 04:57
11174

It is Application output window.
I have attached the png file, please have a look.

Thanks.

ChrisW67
26th May 2015, 21:50
Ok. You mean the widget that appears at the top of the Qt Creator Application output and similar screen areas. This is not a window (i.e. A parentless widget), and that is not the title bar (a window manager decoration on a window). It is just another heavily styled widget packed into a layout. If you want to see exactly how that widget was constructed you have access to the Qt Creator source. Possibly in this folder
https://github.com/qtproject/qt-creator/tree/master/src/plugins/coreplugin
But it will take quite a bit of digging and you will probably not be able to copy-and-paste