PDA

View Full Version : Promoted widgets and layout boxes



notsonerdysunny
25th April 2007, 21:30
Hi,
I used QWidget as a place holder for some of my custom widgets and put it in the layout. I had promoted Widget to my custom widget in the designer. Then I had laid them out with a QVBoxLayout using the Qt Designer. But, when I build the program, the laying out seems to have not effect on the promoted widgets. They all appear on the top left corner of my window.. what do i do?
Please help!!
Sunil.

wysota
25th April 2007, 23:00
Do you get any warnings during any stage of the development? Do your widgets behave correctly when the layout is hand coded?

marcel
28th April 2007, 21:43
Do you move your widgets somewhere in your code ( setGeometry etc...). This could cause them to force their position in the top left corner?

Could we see the UI with the generic widgets and layouts?

Regards

KShots
2nd May 2007, 14:15
Are you sure this widget is your custom widget? QDesigner has for quite a while been suffering from a bug of occasionally generating spurious widgets. Generally, the only way to get rid of these widgets is to shut down designer, manually edit your .ui file (backup first), look for unnamed widgets, and remove them.

Because you have promoted a custom widget based on QWidget, you cannot simply remove all QWidgets from your .ui file... make sure your custom widget has a name and be careful.