PDA

View Full Version : How to resize the Items in FormLayout



sudhansu
3rd December 2009, 11:04
Hi ALl,
I've a tabwidget and a MdiArea in a FormLayout. How to make it resizable. plz help.

Thank u All.

wysota
3rd December 2009, 12:01
Could you explain what you mean by "resizable"? And please don't tell me "to be able to change its size".

sudhansu
3rd December 2009, 12:53
Could you explain what you mean by "resizable"? And please don't tell me "to be able to change its size".
Hi Wysota,
I've attched the ui doc. As per the attached doc, MdiArea and tabWidget is attched to a formlayout. I want to make my tabwidget expandable, i.e if i increase the tabwidget, then mdiArea size should be decrease. How to do this.???:(

wysota
3rd December 2009, 12:56
In my opinion you need a splitter, not a form layout.

sudhansu
3rd December 2009, 13:14
Could you explain what you mean by "resizable"? And please don't tell me "to be able to change its size".


In my opinion you need a splitter, not a form layout.

Hi
I've no of push buttons in side a horizental lay out(Plz check the attched doc) .
Inside constructor i did like


QSplitter *split = new QSplitter(Qt::Horizontal, this);
split->addWidget(ui->tabWidget);
split->addWidget(ui->mdiArea);

But output is coming like the attched output.doc.
3932

wysota
3rd December 2009, 13:29
Please provide a minimal compilable example reproducing the problem. BTW. You remembered to place the splitter in a layout, right?

sudhansu
3rd December 2009, 13:34
Please provide a minimal compilable example reproducing the problem. BTW. You remembered to place the splitter in a layout, right?

Hi i've attached the code. can u plz chk it.

wysota
3rd December 2009, 13:37
The splitter should be instead of the layout, not floating around in the widget right next to the layout...

sudhansu
4th December 2009, 04:24
The splitter should be instead of the layout, not floating around in the widget right next to the layout...

Hi,
Can u plz tell me how to do it.??? Is there any wy to add splitter through Designer?? I c'dnot find.
Thank u.

dbzhang800
4th December 2009, 05:10
Hi,
Can u plz tell me how to do it.??? Is there any wy to add splitter through Designer?? I c'dnot find.
Thank u.
read qt manual

http://qt.nokia.com/doc/4.6/designer-layouts.html

sudhansu
4th December 2009, 05:44
read qt manual

http://qt.nokia.com/doc/4.6/designer-layouts.html

Hi
Thanks for reply. My question was , how to add spliter thru Qt designer. Coz, if i right click on my widget, layout vertical in spliter and layout horizental in spliter is disable. and in designer widget box i could not find the splitter.

dbzhang800
4th December 2009, 06:10
Hi
Thanks for reply. My question was , how to add spliter thru Qt designer. Coz, if i right click on my widget, layout vertical in spliter and layout horizental in spliter is disable. and in designer widget box i could not find the splitter.

Select two or more widgets, then spliter will be auto enabled.

sudhansu
4th December 2009, 06:34
Select two or more widgets, then spliter will be auto enabled.

Thank you very much.