I have the following source code:
Processmethod()
{
QDialog *ProcessMessage = new QDialog;
Ui::DialogProcessMessage Dialog;
Dialog.setupUi(ProcessMessage);
ProcessMessage->setModal(true);
ProcessMessage->setAttribute(Qt::WA_DeleteOnClose);
ProcessMessage->show();
PROCESSES START
}
After I want to show the QDialog “ProcessMessage” there are three QProcess processes included in three different following methods. If I disable these methods with // the popup window appears just fine, but if I enable the methods, the processes run fine, but the popup window does not appear. Any ideas/solutions ? greetings
Your window do not show until Process method is not return because main application loop implemented in main function
So if you call your PROCESSES START nothing happened until Process method returns in QApplication::exec()
You can start your processes in separate thread and send progress notification to you dialog by implementing signals\slots in queued mode