PDA

View Full Version : QToolBox



mickey
10th February 2006, 18:04
Hi,
I designed my application with a toolBox on the right(from QT Designer). But now, I'd like
to change his dimension from mainForm.ui.h. I tried myToolbox->setGeometry(0,0,50,100) but the position and dimensions don't change. Is it possible to do this?
Thanks.

yogeshm02
11th February 2006, 15:34
Have you used QLayout for layout?
If yes, it is very difficult, if not impossible, for setting geometry.
If no, try using move(0, 0) & resize(50, 100).

More detail is needed for further thoughts, hope this helps.

mickey
11th February 2006, 15:44
(I insert myToolBox by QTDesigner. I selected it from toolbox of qt designer. It insert in a QHBoxLayout).
I try toollBox->move (0,0) but don't move it! 'resize' don't resize.
Any hints? (But is it possible?)
Thanks.

yogeshm02
11th February 2006, 15:53
(I insert myToolBox by QTDesigner. I selected it from toolbox of qt designer. It insert in a QHBoxLayout).
I try toollBox->move (0,0) but don't move it! 'resize' don't resize.
Any hints? (But is it possible?)
When you use QLayout (derivatives) all layout of all widgets in parent widget is managed by that instance (in your case it is QHBoxLayout). So as i mentioned earlier in my other post move is impossible as long as you are using a QLayout, as for resize, you may try to setMaximumSize() to see if it works. There may be more tricks but they are unknown to me.

Secondly, you can be part with QHBoxLayout and position & resize each item manually.

yogeshm02
11th February 2006, 16:03
You can also use QHBoxLayout::setMargin(0)