Unsolved Splashscreen not compatible with embedded?
-
Hi,
I want to integrate a Splashscreen my App (embedded and QML) using a QSplashScreen. I followed the QSplashscreen example but I get the error:
@
Application stops with 'EGLFS: OpenGL windows cannot be mixed with others.'
@Is splashscreen not compatible with embedded apps?
Here is my code:
@
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPixmap pixmap("qrc:/images/logo.png");
QSplashScreen splash(pixmap);
splash.show();QQuickStyle::setStyle("Material");
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
return app.exec();
}
@Actually, the only thing I need is a fullsize loading screen. Is there a better way?
-
Was not working for me too and got the same error. Try http://doc.qt.io/qt-5/qtpurchasing-qthangman-qml-qthangman-main-qml.html .
-
For which platform? Android or iOs? As far as I know there is no platform independent solution. That's because it takes some time until the Qt application gets the control. So if you would add the splashscreen to the Qt application it would probably not make much sense as the heavy lifting is already done and the application is (almost) done loading. So you need to invoke the splashscreen before.
If you are developing for android you can take a look at this: https://medium.com/@benlaud/complete-guide-to-make-a-splash-screen-for-your-qml-android-application-567ca3bc70af#.okatgw5e4
By the way, the flickering that the author talks about is almost gone in Qt 5.7. They introduced a pretty cool thing in Qt 5.7 which lets you hide the splashscreen when the application is done loading. There is a really interesting video available where Bogdan talks about the cool new Android features in 5.7. Just search for "KDAB blog" on google...it's one of the latest blog entries (sorry don't have a direct link but you can find it very easily on the blog ;)). It's a really cool video...he also talks about JNI. So if you haven't seen it then I can really recommend it.