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.