-
-
Notifications
You must be signed in to change notification settings - Fork 236
Open
Description
My source code implements: after receiving the instanceStarted signal, a prompt dialog box pops up.
But this causes a problem:
After clicking OK, the dialog box closes, but the main process also exits.
How can I solve this problem?
Windows 11/Qt5.15.2/VS2019 x64
int main(int argc, char *argv[])
{
SingleApplication a(argc, argv);
QObject::connect(&a, &SingleApplication::instanceStarted, [=]() {
QMessageBox::information(0, QObject::tr("info"), QObject::tr("I am running"));
});
Form w;
w.show();
return a.exec();
}Metadata
Metadata
Assignees
Labels
No labels