Reputation: 2079
I'm displaying mainwindow in one function with this code:
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Engine engine;
MainWindow w(&engine);
w.show();
return a.exec();
}
Then in mainWindow I hide it and display dialog window with this code:
this->hide();
SomeDialog x;
x.setModal(true);
x.exec();
And then in the new SomeDialog window code I want to do something like this:
this->close();
parentMainWindow.show();
I think it would be possible by passing the parent MainWindow object to the constructors but I wonder whether there is some other option. Is there?
Upvotes: 2
Views: 2527