PDA

View Full Version : How Do I Float a QToolBar?



dvmorris
28th April 2007, 23:07
Does anyone know how to get a QToolBar to be allowed to float, and not always have to sit in a dock area? The documentation doesn't match up. In QDockWindow it says it is inherited by QToolBar, and in QToolBar it says nothing about inheriting QDockWindow.

However, in 3.3 QToolBar does inherit QDockWindow and was allowed to float...

I found this post that was never answered. Thanks for the help:

http://lists.trolltech.com/qt-interest/2006-05/thread01375-0.html

dave

dvmorris
28th April 2007, 23:19
looks like it has been submitted as a bug or feature request, and the version to fix it has been set to 4.4.0. that is kind of ridiculous considering it used to work fine:

http://www.trolltech.com/developer/task-tracker/index_html?method=entry&id=101492

dvmorris
28th April 2007, 23:29
Does anyone know how I can use QActions in the same way QToolBar does, for a QDockWidget or a QDockWindow?

jpn
28th April 2007, 23:53
Does anyone know how I can use QActions in the same way QToolBar does, for a QDockWidget or a QDockWindow?
As far as I know, QToolBar creates QToolButtons to represent the actions added to it. It's basically impossible to hide the title of a QDockWidget so it might not be that straightforward to make a QDockWidget to imitate QToolBar behavior.

dvmorris
29th April 2007, 00:07
Ideally I would like a multicolumn floatable QToolBar, so maybe someday they will implement that... until then I'll just settle for how QToolBar works now. Thanks for your reply,
dave

Bitto
29th April 2007, 09:07
In Qt 4.3, you can float toolbars.

http://doc.trolltech.com/4.3-snapshot/qtoolbar.html#floatable-prop

dvmorris
29th April 2007, 17:02
i'm using qt 4.3.0beta, does this mean i need to redownload and recompile qt to get this to work? or can i download a few files and integrate it into what i already have?

Bitto
29th April 2007, 19:01
I would not recommend patching your existing Qt sources. The latest snapshots should be even more stable than 4.3.0beta, so moving to the latest snapshot should be painless :-).