Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - #ifdef QT_QML_DEBUG
 - #include <QtQuick>
 - #endif
 - #include <QtQuick>
 - #include <sailfishapp.h>
 - #include "thumbnailprovider.h"
 - #include "settings.h"
 - #include "filelist.h"
 - int main(int argc, char *argv[])
 - {
 - // SailfishApp::main() will display "qml/template.qml", if you need more
 - // control over initialization, you can use:
 - //
 - // - SailfishApp::application(int, char *[]) to get the QGuiApplication *
 - // - SailfishApp::createView() to get a new QQuickView * instance
 - // - SailfishApp::pathTo(QString) to get a QUrl to a resource file
 - //
 - // To display the view, call "show()" (will show fullscreen on device).
 - QGuiApplication *app = SailfishApp::application(argc, argv);
 - QQuickView *view = SailfishApp::createView();
 - // Add image providers and C++ classes
 - view->engine()->addImageProvider(QLatin1String("thumbnail"), new ThumbnailProvider);
 - FileList fileList;
 - view->engine()->rootContext()->setContextProperty("fileList", &fileList);
 - Settings settings;
 - view->engine()->rootContext()->setContextProperty("settings", &settings);
 - // Show the application
 - view->setSource(SailfishApp::pathTo("qml/MediaViewer.qml"));
 - view->show();
 - return app->exec();
 - }
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment