<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to open a window before running app.exec() ?]]></title><description><![CDATA[<p dir="auto">Hello there! Total noob here in c++ programming with Qt</p>
<p dir="auto">I have an application that before starting needs to unzip a file (using QProcess), and the operation may need some time, and then it should open a QML file that uses the unzipped files.</p>
<p dir="auto">I'd like to show a message, a loading indicator, something like this, until the unzipping process is ended. I tried something like this:</p>
<pre><code>QPushButton button("loading, please wait");
button.show():

unzip();

butt.hide()

const QUrl url(QStringLiteral("qrc:/main.qml"));
    QObject::connect(&amp;engine, &amp;QQmlApplicationEngine::objectCreated,
                     &amp;app, [url](QObject *obj, const QUrl &amp;objUrl) {
        if (!obj &amp;&amp; url == objUrl)
            QCoreApplication::exit(-1);
    }, Qt::QueuedConnection);
    engine.load(url);

 return app.exec();

</code></pre>
<p dir="auto">but the button showing is completely blank, and loads its text only after app.exec() is executed, so after the unzip has ended<br />
what can I do to make it show before the unzip process has ended?</p>
<p dir="auto">thank you in advance!</p>
]]></description><link>https://forum.qt.io/topic/137614/how-to-open-a-window-before-running-app-exec</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Apr 2026 06:59:38 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/137614.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 01 Jul 2022 15:45:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to open a window before running app.exec() ? on Sat, 02 Jul 2022 14:43:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> QSplashScreen is perfect!</p>
<p dir="auto">with <code>app.processEvents();</code> I can show the splashscreen before running the main loop with <code>app.exec()</code></p>
<p dir="auto">thank you very much!</p>
]]></description><link>https://forum.qt.io/post/719880</link><guid isPermaLink="true">https://forum.qt.io/post/719880</guid><dc:creator><![CDATA[tubbadu]]></dc:creator><pubDate>Sat, 02 Jul 2022 14:43:08 GMT</pubDate></item><item><title><![CDATA[Reply to How to open a window before running app.exec() ? on Fri, 01 Jul 2022 18:01:48 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">You are looking for either <a href="https://doc.qt.io/qt-6/qprogressdialog.html" target="_blank" rel="noopener noreferrer nofollow ugc">QProgressDialog</a> or <a href="https://doc.qt.io/qt-6/qsplashscreen.html" target="_blank" rel="noopener noreferrer nofollow ugc">QSplashScreen</a>.</p>
]]></description><link>https://forum.qt.io/post/719824</link><guid isPermaLink="true">https://forum.qt.io/post/719824</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Fri, 01 Jul 2022 18:01:48 GMT</pubDate></item></channel></rss>