void activateMainWidget(){ QWidgetList widgets = QApplication::allWidgets(); if (!widgets.isEmpty()) { QWidget *w = widgets.at(0); w->setWindowState(w->windowState() & ~Qt::WindowMinimized); w->raise(); w->activateWindow(); }}
#ifdef Q_WS_WIN AllowSetForegroundWindow( ASFW_ANY );#endif