SvenA
9th April 2015, 17:39
Hello!
I'm trying to create an multiple window application and have problems with the
modal dialogs.
My basic code is the following:
MainWindow *mainWin = new MainWindow;
mainWin->show();
In the MainWindow class I have the following function:
void MainWindow::newWindow()
{
MainWindow *mainWin = new MainWindow;
mainWin->show();
}
This works fine.
But, the modal dialogs executed from the MainWindow class (for adding/editing data)
block any showed windows. I expected the dialogs only to block the (base) main window
it was called from, but instead it blocked any other main windows too.
Is this so by Qt's design or is there any way to change this behavior?
Regards
Sven
I'm trying to create an multiple window application and have problems with the
modal dialogs.
My basic code is the following:
MainWindow *mainWin = new MainWindow;
mainWin->show();
In the MainWindow class I have the following function:
void MainWindow::newWindow()
{
MainWindow *mainWin = new MainWindow;
mainWin->show();
}
This works fine.
But, the modal dialogs executed from the MainWindow class (for adding/editing data)
block any showed windows. I expected the dialogs only to block the (base) main window
it was called from, but instead it blocked any other main windows too.
Is this so by Qt's design or is there any way to change this behavior?
Regards
Sven