Hi
I tried to make an QML Splashscreen, it worked fine but I think this isn't the best way.
After research I figured out how to use a Qt Splashscreen, everything is inside of main.cpp:
- you have to import:
#include <QtGui/QSplashScreen>
#include <QtGui/QPixmap>
than edit your main method:
(you have to add this part before the QmlApplication viewer)
QSplashScreen *splash = new QSplashScreen(QPixmap(":/splash/splash.jpg"));
splash->show();
than after the viewer code put:
splash->finish(&viewer);
splash->deleteLater();
of course before the "return app->exec();"
This will brick the Qt Simulator, so comment this parts if you test your app!
the path ":/splash/splash.jpg" is for qrc, so add:
<RCC>
<qresource prefix="/">
<file>splash/splash.jpg</file>
</qresource>
</RCC>
to your qrc file.
The best picture size is 640*640, because the picture get's croped (depending on your devices orientation)
I attached an example.
Sources:
http://harmattan-dev.nokia.com/docs/library/html/qt4/qsplashscreen.html?tab=3&q=splash&sp=allhttps://github.com/dicksonleong/GagBook[attachment deleted by admin]