View Full Version : QDockWidget default size ?
pl01
19th December 2010, 13:29
Hi,
I have put a graphic view and 2 dock widgets in my window. The problem is that the default width of the dock widget is very small.
I would like to force an initial width (not a minimum width !!!)
Does someone can tell me how to do this ?
Thx
codeslicer
19th December 2010, 13:51
QDockWidget automatically resizes based on its content widget, that you set with setWidget() - http://doc.qt.nokia.com/latest/qdockwidget.html#setWidget.
If you still want to control its size, use QWidget::resize(int w, int h) - http://doc.qt.nokia.com/latest/qwidget.html#size-prop
pl01
20th December 2010, 09:10
Thanks,
In the designer the dock widget has a default width of 80, it is strange that we cannot change this !
Also, normally the child widgets should be resized based on the size of the dock widget... and not the inverse ! I have play with several docking control VC, WPF, ... and it was always like this !
So, why here it is the inverse ?
Also, I don't want to have a fixed(or minimum) size for childs widgets, I want that they follow the size of the dock widget ! Finally the problem is the same.
The solution is to change this by code at runtime... maybe... but it is strange that it is not a parameter in the designer !
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.