Use open with a "new" pointer, and connect the signals of accepted and rejected or something else that you need.
The dialog is closing when the function reachs it's end. So, if you don't want to block the main thread, you have two options:
- Open a new thread and run exec;
- Use Dialog::open with new pointer in the same thread and connect it to slots, check the result and delete it;
You can try this too:
void mySlotThatOpensTheDialog()
{
PlayerMenu menu;
menu.exec();
}
void myFunctionThatWillCallTheDialog()
{
QTimer::singleShot(0,
this,
SLOT(mySlotThatOpensTheDialog
()));
}
void mySlotThatOpensTheDialog()
{
PlayerMenu menu;
menu.exec();
}
void myFunctionThatWillCallTheDialog()
{
QTimer::singleShot(0, this, SLOT(mySlotThatOpensTheDialog()));
}
To copy to clipboard, switch view to plain text mode
Bookmarks