diff options
Diffstat (limited to 'examples/video/qmlvideofx/main.cpp')
-rw-r--r-- | examples/video/qmlvideofx/main.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/video/qmlvideofx/main.cpp b/examples/video/qmlvideofx/main.cpp index a7157c821..1b4f17eac 100644 --- a/examples/video/qmlvideofx/main.cpp +++ b/examples/video/qmlvideofx/main.cpp @@ -39,6 +39,7 @@ ** ****************************************************************************/ +#include <QtCore/QStandardPaths> #include <QtCore/QStringList> #include <QtDeclarative/QDeclarativeContext> #include <QtGui/QGuiApplication> @@ -116,6 +117,18 @@ int main(int argc, char *argv[]) FileReader fileReader; viewer.rootContext()->setContextProperty("fileReader", &fileReader); + QString imagePath = "../../images"; + const QStringList picturesLocation = QStandardPaths::standardLocations(QStandardPaths::PicturesLocation); + if (!picturesLocation.isEmpty()) + imagePath = picturesLocation.first(); + viewer.rootContext()->setContextProperty("imagePath", imagePath); + + QString videoPath; + const QStringList moviesLocation = QStandardPaths::standardLocations(QStandardPaths::MoviesLocation); + if (!moviesLocation.isEmpty()) + videoPath = moviesLocation.first(); + viewer.rootContext()->setContextProperty("videoPath", videoPath); + #ifdef SMALL_SCREEN_PHYSICAL viewer.showFullScreen(); #else |