How to have a splash screen in android application built with QML?
how i can have a splash screen in Qt for android apps.
Note:i have tried creating splash screen using "QSplashScreen " ,but i guess it is not a proper way of doing it for android because you can observe a flicker after showing the splash ,also for this i have to add widget (QT += widgets )module into .pro file which i don't want to do,also it requires "QApplication " in main file but iam using "QGuipplication" .
You can create a splash screen by creating a new QML file (splashscreen.qml for example) and simply have an image in it that is loaded (for speed sake) from the resource file (compiled into the executable).
Then in your main.qml, show that splash screen with a timer while you load your other resources asynchronously.
So long story short, a splash screen is nothing more than a qml Item with an image in it, shown at the start of the app and hidden whenever loading (whatever that is) is finished.
If you want a custom splash screen for android, usually there's a white screen with the application name by default before the actual app is completely loaded, you'll have to add that in the manifest file.
The manifest file created by QtCreator for example has the correct method in it already but IIRC it's commented out:
<!-- Splash screen --> <meta-data android:name="android.app.splash_screen_drawable" android:resource="@drawable/launch_logo"/> <!-- Splash screen -->
i feel this link is useful !!!