<?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[[solved]shows splashscreen but does not show its message]]></title><description><![CDATA[<p dir="auto">i created a splashscreen for my application; however, it shows the splashscreen and then disappears  but it  does not show its message like loading modules and establish connections through the showMessage(). why?</p>
<p dir="auto">attached is my code</p>
<p dir="auto">@<br />
#include &lt;QtGui/QApplication&gt;<br />
#include "mobile.h"<br />
#include &lt;QSplashScreen&gt;</p>
<p dir="auto">int main(int argc, char *argv[])<br />
{<br />
QApplication a(argc, argv);</p>
<pre><code>QPixmap pixmap(":/images/mobile.jpg");
 QSplashScreen *splash = new QSplashScreen(pixmap);
 splash-&gt;show();
 a.processEvents();



 //Qt::Alignment topRight = Qt::AlignRight | Qt::AlignTop;
    splash-&gt;showMessage("Setting up the main window...");
                           //topRight, Qt::white);
</code></pre>
<p dir="auto">a.processEvents();<br />
splash-&gt;showMessage("Loading modules...");<br />
//topRight, Qt::white);</p>
<p dir="auto">a.processEvents();</p>
<pre><code>        splash-&gt;showMessage("Establishing connections...");
                               //topRight, Qt::white);
</code></pre>
<p dir="auto">a.processEvents();</p>
<pre><code>mobile w;
w.show();
splash-&gt;finish(&amp;w);
delete splash;


return a.exec(&amp;#41;;
</code></pre>
<p dir="auto">}<br />
@</p>
<p dir="auto">[<em>edit: Code highlighted / Denis Kormalev</em>]</p>
]]></description><link>https://forum.qt.io/topic/1911/solved-shows-splashscreen-but-does-not-show-its-message</link><generator>RSS for Node</generator><lastBuildDate>Sun, 17 May 2026 20:49:26 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/1911.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 25 Nov 2010 03:04:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [solved]shows splashscreen but does not show its message on Thu, 25 Nov 2010 23:49:34 GMT]]></title><description><![CDATA[<p dir="auto">[quote author="Denis Kormalev" date="1290689201"]Maybe you are just showing black text on a black splashscreen?[/quote]</p>
<p dir="auto">Yeah, seems to be truth</p>
]]></description><link>https://forum.qt.io/post/60849</link><guid isPermaLink="true">https://forum.qt.io/post/60849</guid><dc:creator><![CDATA[IrQX]]></dc:creator><pubDate>Thu, 25 Nov 2010 23:49:34 GMT</pubDate></item><item><title><![CDATA[Reply to [solved]shows splashscreen but does not show its message on Thu, 25 Nov 2010 12:46:41 GMT]]></title><description><![CDATA[<p dir="auto">Maybe you are just showing black text on a black splashscreen?</p>
]]></description><link>https://forum.qt.io/post/60757</link><guid isPermaLink="true">https://forum.qt.io/post/60757</guid><dc:creator><![CDATA[DenisKormalev]]></dc:creator><pubDate>Thu, 25 Nov 2010 12:46:41 GMT</pubDate></item><item><title><![CDATA[Reply to [solved]shows splashscreen but does not show its message on Thu, 25 Nov 2010 08:07:14 GMT]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I took the code and added a sleep, as the comments for do some stuff will not take time :-)<br />
This code shows the texts:<br />
@/**</p>
<ul>
<li>this class is used to call sleep, as msleep is a protected function of QThread<br />
<em>/<br />
class CxTestSleepThread : public QThread<br />
{<br />
public:<br />
/</em>*
<ul>
<li>this method is used to call sleep, as msleep is a protected function of</li>
<li>QThread</li>
<li></li>
<li>@param nMSecs milliseconds to sleep<br />
*/<br />
static void mySleep(int nMSecs)<br />
{<br />
msleep(nMSecs);<br />
}<br />
};</li>
</ul>
</li>
</ul>
<p dir="auto">int main(int argc, char *argv[])<br />
{<br />
QApplication app(argc, argv);</p>
<pre><code>QScopedPointer&lt;QSplashScreen&gt; splash(new QSplashScreen(QPixmap(":/splash")));
splash-&gt;show();
splash-&gt;showMessage(QSplashScreen::tr("Loading..."), Qt::AlignBottom | Qt::AlignHCenter, Qt::white);
app.processEvents();

CxTestSleepThread::mySleep(500);
// some code

splash-&gt;showMessage(QSplashScreen::tr("Settings Manager: loading saved settings"), Qt::AlignBottom | Qt::AlignHCenter, Qt::white);
app.processEvents();

CxTestSleepThread::mySleep(500);
// loading settings

splash-&gt;showMessage(QSplashScreen::tr("Plugin Manager: loading plugins"), Qt::AlignBottom | Qt::AlignHCenter, Qt::white);
app.processEvents();

CxTestSleepThread::mySleep(500);
// loading plugins

MainWindow w;
w.setWindowTitle(app.applicationName());
w.showMaximized();
splash-&gt;finish(&amp;w);
return app.exec();
</code></pre>
<p dir="auto">}<br />
@</p>
]]></description><link>https://forum.qt.io/post/60718</link><guid isPermaLink="true">https://forum.qt.io/post/60718</guid><dc:creator><![CDATA[giesbert]]></dc:creator><pubDate>Thu, 25 Nov 2010 08:07:14 GMT</pubDate></item><item><title><![CDATA[Reply to [solved]shows splashscreen but does not show its message on Thu, 25 Nov 2010 06:57:55 GMT]]></title><description><![CDATA[<p dir="auto">i tried ur sample code; however, it still does not show the message on the splashscreen</p>
]]></description><link>https://forum.qt.io/post/60714</link><guid isPermaLink="true">https://forum.qt.io/post/60714</guid><dc:creator><![CDATA[tunde]]></dc:creator><pubDate>Thu, 25 Nov 2010 06:57:55 GMT</pubDate></item><item><title><![CDATA[Reply to [solved]shows splashscreen but does not show its message on Thu, 25 Nov 2010 04:32:06 GMT]]></title><description><![CDATA[<p dir="auto">BTW, working sample:</p>
<p dir="auto">But, i used QScoperPointer. You can replace it to standart pointer or non-pointer class instance.</p>
<p dir="auto">@QApplication app(argc, argv);</p>
<pre><code>QScopedPointer&lt;QSplashScreen&gt; splash(new QSplashScreen(QPixmap(":/splash")));
splash-&gt;show();
splash-&gt;showMessage(QSplashScreen::tr("Loading..."), Qt::AlignBottom | Qt::AlignHCenter, Qt::black);
app.processEvents();
</code></pre>
<p dir="auto">// some code</p>
<pre><code>splash-&gt;showMessage(QSplashScreen::tr("Settings Manager: loading saved settings"), Qt::AlignBottom | Qt::AlignHCenter, Qt::black);
app.processEvents();
</code></pre>
<p dir="auto">// loading settings</p>
<pre><code>splash-&gt;showMessage(QSplashScreen::tr("Plugin Manager: loading plugins"), Qt::AlignBottom | Qt::AlignHCenter, Qt::black);
app.processEvents();
</code></pre>
<p dir="auto">// loading plugins</p>
<pre><code>MainWindow w;
w.setWindowTitle(app.applicationName());
w.showMaximized();
splash-&gt;finish(&amp;w);
int rslt = app.exec(); @
</code></pre>
]]></description><link>https://forum.qt.io/post/60701</link><guid isPermaLink="true">https://forum.qt.io/post/60701</guid><dc:creator><![CDATA[IrQX]]></dc:creator><pubDate>Thu, 25 Nov 2010 04:32:06 GMT</pubDate></item><item><title><![CDATA[Reply to [solved]shows splashscreen but does not show its message on Thu, 25 Nov 2010 04:28:43 GMT]]></title><description><![CDATA[<p dir="auto">bad formating, making code hard to understand.</p>
]]></description><link>https://forum.qt.io/post/60698</link><guid isPermaLink="true">https://forum.qt.io/post/60698</guid><dc:creator><![CDATA[IrQX]]></dc:creator><pubDate>Thu, 25 Nov 2010 04:28:43 GMT</pubDate></item></channel></rss>