C++ (Qt) struct Thread : QThread{ Q_OBJECTsignals: void sig();protected: void run () { emit sig(); exec(); }};...QDialog* dlg;... { dlg=new QDialog(); dlg->setWindowModality(Qt::ApplicationModal); dlg->show(); Thread *t1,*t2; t1 = new Thread(); t2 = new Thread(); t1->moveToThread(t1); t2->moveToThread(t2); QObject::connect(t1,SIGNAL(sig()),dlg,SLOT(exec())); QObject::connect(t2,SIGNAL(sig()),dlg,SLOT(exec())); t1->start(); t2->start(); return;}