If you can write main window, you should be able to write code below:
int main(int argc, char *argv[])
{
MagicDialog d( this );
if( d.exec() )
{
MainWindow w;
w.show();
return a.exec();
}
return -1;
}
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MagicDialog d( this );
if( d.exec() )
{
MainWindow w;
w.show();
return a.exec();
}
return -1;
}
To copy to clipboard, switch view to plain text mode
In MagicDialog connect whatever button you want to accept() slot to show main window, connect other button to reject() to terminate the application.
Bookmarks