Do not loose the content when switching app
This commit is contained in:
parent
ffdd7b19e2
commit
accb8ff09d
3 changed files with 12 additions and 2 deletions
|
@ -9,7 +9,7 @@ OTHER_FILES += \
|
|||
qml/cover/CoverPage.qml \
|
||||
translations/*.ts \
|
||||
qml/pages/MainPage.qml \
|
||||
qml/harbour-papocchio.qml \
|
||||
qml/Papocchio.qml \
|
||||
harbour-papocchio.desktop \
|
||||
rpm/harbour-papocchio.changes \
|
||||
rpm/harbour-papocchio.spec \
|
||||
|
|
12
src/main.cpp
12
src/main.cpp
|
@ -22,7 +22,17 @@
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QGuiApplication *app = SailfishApp::application(argc, argv);
|
||||
|
||||
return SailfishApp::main(argc, argv);
|
||||
// Otherwise the Canvas is cleaned when the application is not
|
||||
// marked as active. See for more:
|
||||
// https://lists.sailfishos.org/pipermail/devel/2014-October/005065.html
|
||||
QQuickView *view = SailfishApp::createView();
|
||||
view->setSource(SailfishApp::pathTo("qml/Papocchio.qml"));
|
||||
view->setPersistentOpenGLContext(true);
|
||||
view->setPersistentSceneGraph(true);
|
||||
view->show();
|
||||
|
||||
return app->exec();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue