12345678910111213141516171819202122 |
- #include "loader.h"
- #include <QTimer>
- Loader::Loader(QObject *parent) :
- QObject(parent)
- {
- viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockPortrait);
- mainapp.setOrientation(QmlApplicationViewer::ScreenOrientationLockPortrait);
- viewer.setMainQmlFile(QLatin1String("qml/groupmypictures/Splashscreen.qml"));
- viewer.showExpanded();
- connect(&mainapp,SIGNAL(statusChanged(QDeclarativeView::Status)),this,SLOT(onStatusChanged(QDeclarativeView::Status)));
- mainapp.setMainQmlFile(QLatin1String("qml/groupmypictures/main.qml"));
- }
- void Loader::onStatusChanged(QDeclarativeView::Status status)
- {
- if(status == QDeclarativeView::Ready){
- viewer.close();
- mainapp.showExpanded();
- }
- }
|