Qt 4.8.5 Understanding QMessagebox .exec() and .show()
<p>I'm doing a QWizard with QT 4.8.5 and in some pages I have to close some other applications and exit my program. This works fine but now I want to show a pop up message that tells the user that the programs are restarting (There are others a part of mine and mine is the last one to be closed always). The code I use to show the pop up is the next one and I place it in the validatepage of a QWizardpage:</p>

<pre><code>  QMessageBox *msgBox1 = new QMessageBox;
    msgBox1-&gt;setWindowTitle("Title...");
    msgBox1-&gt;setIcon(QMessageBox::Information);
    msgBox1-&gt;setText(" blablablalbal bla bla bla.");
    msgBox1-&gt;setWindowModality(Qt::NonModal);
    msgBox1-&gt;show();
    QCoreApplication::processEvents(); // without this line, the show does nothing and I can't see my pop up window
</code></pre>

<p>So the thing is: With that code, When I am in that wizardpage and click to finish, it launches the QMessageBox while (behind) the program is restarting the other applications and then closes itself (with a QApplication::quit(); ) which is exactly what I want... BUT no message is shown in the pop up... I can't see the icon, the title or the text... :S I don't know why :(</p>

<p>Whereas when use ->exec(); instead of show, the icon, title and text are shown BUT when the pop up appears, nothing is done behind until the user closes that pop up... :S</p>

<p>I understand that .exec() freezes all until user closes the pop up while show doesn't...</p>

<p>So... how can I see the text with the show() behaviour?? I don't want the user to interact with that pop up, I just need the pop up to show up while closing all until my program closes too...</p>

<p>Thank you so much!</p>