PDA

View Full Version : QDockWidget size



user
6th January 2009, 05:10
I would like to know if there were any updates regarding the setting of initial size for the dockWidget.
I found a previous post http://www.qtcentre.org/forum/f-qt-programming-2/t-qdockwidget-size-556.html that mentioned there will be a fix in version 4.2.
I use Qt version 4.4.3 but the only way I can find to set initial size is by using setMinimumWidth() which I don't want to do (since I want to be able to resize the widget).

In a different post there was a link to a closed bug report http://trolltech.com/developer/task-tracker/index_html?method=entry&id=146752
but when I resize my dockWidget (horizontally or vertically) than hide and show it, the widget goes back to it's original size (this only happens for docked windows) is there something I should do for the window to remember it's state?

user
7th January 2009, 00:44
After a bit of searching I found in the Qt examples Main Windows->Dock Widgets the same problem of resizing-hiding-showing the dock widget and getting the original size.
Also http://trolltech.com/developer/task-tracker/index_html?method=entry&id=173854 and http://trolltech.com/developer/task-tracker/index_html?method=entry&id=235188
mention a fix scheduled for 4.5.0.

As for setting initial size for the dockWidget I found http://trolltech.com/developer/task-tracker/index_html?method=entry&id=170298 which doesn't have a fix. All I want to do is to get my dockWidget to expand to full screen (since my central widget is empty).

Can anyone provide any more info or suggestions?

jpn
8th January 2009, 20:35
You can check how this bug was worked around in QxtDockWidget (http://doc.libqxt.org/latest/classQxtDockWidget.html).