In my Qt Application I\'m facing the following scenario:
When a specific event is raised I show a modeless QDialog
which asks the user for a confirmation.
The D
I found a working solution:
void MainWindow::TimerElapsed()
{
QWidget *pwidget=NULL;
m_qTimer.stop();
foreach(pwidget,QApplication::topLevelWidgets())
{
if ((pwidget->isWindow())&&(pwidget->isModal()))
{
m_pModeless->setParent(pwidget);
}
}
if (pwidget==NULL)
{
m_pModeless->setParent(this);
}
m_pModeless->show();
m_pModeless->activateWindow();
m_pModeless->raise();
m_pModeless->setFocus();
}