PDA

View Full Version : QDockWidget Tabbed State



jtaylor108
1st August 2007, 02:26
Is there any way to tell when a dock widget has been docked on top of another docked widget (to form a tabbed dock window)?

I can handle the "topLevelChanged" signal to tell me when the dock widget has been docked, but I'm not sure how to determine if it has been docked normally or added as a tabbed dock window - the dock widget's parent seems to be the same either way.

Cheers,

jt

marcel
1st August 2007, 08:14
I am afraid you cannot do that.
The dock widgets are handled by the main window's layout. More specifically by the QDockAreaLayout. The function QDockAreaLayout::tabifyDockWidget().

Since QDockWidgetAreaLayout is not in the public API, I do not see a way for doing this.
Also you need QDockAreaLayoutInfo.

A slim chance would be to include qdockwidgetlayout_p.h in your application and use the QDockAreaLyoutInfo class. It has a public method usedTabBars() which returns all the existing tabs used by the dock widgets. Maybe you can use this somehow in conjunction with the other info methods. But its a long shot to actually make this work...

Regards

jtaylor108
2nd August 2007, 00:16
Many thanks for the reply. I've since had confirmation from trolltech that this functionality is indeed missing. However, there has been a request made in the task tracker.

In the meantime I'll investigate your suggestion.

Thanks again,

jt