How to launch mainwindow from a dialog window?
Ok, so the program starts out with a dialog window requesting information from the user to log on. How can I get the mainWindow to open from the dialog window. Thanks.
Off the top of my head, I would implement it like this.
Note the missing b.show(); command.
Then, in the constructor for MyMainWindow,
MyOpenDialog *a = new MyOpenDialog();
As long as MyOpenDialog is set as Application Modal, you won't process the this.show() until after the dialog has closed.
Edit: I should add, if you're all done with MyOpenDialog, you'll want to
@delete a;@ afterwards this.show();
Would you mind to show in complete file MyMainWindow.cpp?
Thanks in advance.
bq. MyOpenDialog *a = new MyOpenDialog();
i think the a->exec() should be followed by some check-up functions that call the .show() if log in was successful.
go for it !