exec() blocks till the dialog gets closed, show() doesn't.
If I do like this:
constructor
{
initialize widgets, buttons, etc.
do some timeconsuming stuff
mydialog->exec();
}
constructor
{
initialize widgets, buttons, etc.
do some timeconsuming stuff
mydialog->exec();
}
To copy to clipboard, switch view to plain text mode
it will take a long time till the user sees the dialog because of the time consuming stuff in the constructor.
If I do like this:
constructor
{
initialize widgets, buttons, etc.
mydialog->exec();
do some timeconsuming stuff
}
constructor
{
initialize widgets, buttons, etc.
mydialog->exec();
do some timeconsuming stuff
}
To copy to clipboard, switch view to plain text mode
then the timeconsuming stuff will be done AFTER the user closed the dialog
If I do like this:
constructor
{
initialize widgets, buttons, etc.
mydialog->show();
do some timeconsuming stuff
}
constructor
{
initialize widgets, buttons, etc.
mydialog->show();
do some timeconsuming stuff
}
To copy to clipboard, switch view to plain text mode
then the parent window/widget will continue (the dialog will not block) and that's not what I want.
Regards.
Bookmarks