Event loop driven programs are always "running", exec() only makes it look like it is not "stopping" at some point.
Instead of writing code "sychronously", e.g. like this
// to one thing
dialog.exec();
// do anoher thing
// to one thing
dialog.exec();
// do anoher thing
To copy to clipboard, switch view to plain text mode
you can always split the two parts into two methods and let the second part be triggered by a signal, e.g. like this
void MyClass::method1()
{
// to one thing
}
void MyClass::method2()
{
// to another thing
}
void MyClass::method1()
{
// to one thing
}
void MyClass::method2()
{
// to another thing
}
To copy to clipboard, switch view to plain text mode
The trigger for the execution of the slot method2() is then a signal from the input widget, that it emits when it is satisfied with the input.
Cheers,
_
Bookmarks