Qt-jambi-interest Archive, October 2007
Re: buttons in the title bar of QDockWidgets
Message 1 in thread
Bruno Janvier wrote:
> Hello jambis,
>
> I think it would be neat to have buttons in the title bar of QDockwidgets
> in the way it looks in Eclipse for example...
>
> I looked at the API and have tried stuffs without success. I wonder if
> anyone had a pointer or a solution for doing it. (maybe it is obvious
> and I missed it but anyway, it is better to ask...)
Hi Bruno,
Are you looking for the toolbar that sits at the top of the tabs and
jumps up to sit next to the tabs when there is enough space? Qt doesn't
support this by default so you would have to write your own wigdet for that.
QDockWidgets let you customize the dockwidgets titlebar, using
setTitleBarWidget:
http://doc.trolltech.com/qtjambi-4.3.1_01/com/trolltech/qt/gui/QDockWidget.html#setTitleBarWidget(com.trolltech.qt.gui.QWidget)
or you can create a "toolbar" under the title by simply adding a widget
with a horizontal box layout and put tool buttons into it.
best regards,
Gunnar