PDA

View Full Version : Adding Widgets to a QFrame instance.



Shiva
19th October 2010, 05:29
Hi All,

I need to add some pushbuttons to an instance of QFrame. I can do this with the help of any of the three layouts. But the problems is I am not able to position my buttons exactly to the place where I want. I tried setGeometry after setting layout but that doesn't seems to be working.

Please let me know how can I position my widgets in a Frame with or without using the Layouts?

Regards,
Siva

Lykurg
19th October 2010, 06:00
You can use absolute position or layouts. But not both together. Best is to use layouts. If you want to adjust the position inside a layout you can use spacer item or set the margins and spacing of the layout to a proper value.

Edit: since you are on an embedded device you can use an absolute position since your screen size is fix. But even then try to use a layout.

Shiva
19th October 2010, 10:18
Lykurg,

Thanks for your valuable suggestion. I tried the same and its working fine...

Regards,
Siva