I tried using the topLevelWidgets function,
if( widget->isWindow ())
{
dial = (Ui_Dialog *)widget;
printf("hiding the window\n");
}
}
foreach (QWidget *widget, QApplication::topLevelWidgets()) {
if( widget->isWindow ())
{
dial = (Ui_Dialog *)widget;
printf("hiding the window\n");
}
}
To copy to clipboard, switch view to plain text mode
But i am getting segmentation fault.
This might be because the application has more than one TopLevelWidget.
In such a case how to i find a exact match for (Ui_Dialog *) ?
Bookmarks