PDA

View Full Version : How to get the top-widget parent of a widget (Ui widget based) ?



tonnot
23rd January 2012, 17:19
I have a Ui widget based, not a Qdialog based.

I'd want to ( I need) to get the 'top' object of any widget.
If the widget is 'ob', using a loop "do while ob->parentwidget!=0" gives me the 'main ui'
My widget is not a dialog, so I could not use this property. I 'd need some 'is_ui' property .


Any help ? Thanks.

wysota
23rd January 2012, 17:58
QWidget::window()

tonnot
23rd January 2012, 18:06
I just was going to write the solution....
Thanks anyway ....