You could do something like this
int main( ... ) {
OptionsDialog dlg;
[...]
if( dlg.exec() != QDailog::Accepted )
return 0; // Terminate if Options not set or may be set defaults
// Get the Options, could use a structure for that
Options options = dlg.options();
MainWindow w;
w.setOptions( options );
w.show();
app.exec();
}
int main( ... ) {
QApplication app( ... );
OptionsDialog dlg;
[...]
if( dlg.exec() != QDailog::Accepted )
return 0; // Terminate if Options not set or may be set defaults
// Get the Options, could use a structure for that
Options options = dlg.options();
MainWindow w;
w.setOptions( options );
w.show();
app.exec();
}
To copy to clipboard, switch view to plain text mode
you can also try to create the Options Dialog dynamically
Bookmarks