diff options
author | Juho Annunen <juho.annunen@qt.io> | 2018-08-21 14:44:48 +0300 |
---|---|---|
committer | Teemu Holappa <teemu.holappa@qt.io> | 2018-08-23 06:55:15 +0000 |
commit | 3594ea2a2dec8a74c2e8baf307c13671ebbdf18c (patch) | |
tree | a83b1cee09a1050ed2c11854dd3c778ceebea229 /basicsuite/shared | |
parent | e81384c45e5c0b90e07057abd2a8788272d14c0f (diff) |
Fix scaling, video path & focusing issues on mediaplayer demo
Task-number: QTBUG-62791
Change-Id: I8ea9bcc27fcf0b2d4fb9f7b8ada165f7a5a5d7c8
Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
Diffstat (limited to 'basicsuite/shared')
-rw-r--r-- | basicsuite/shared/main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/basicsuite/shared/main.cpp b/basicsuite/shared/main.cpp index 58ff00f..4afbbe4 100644 --- a/basicsuite/shared/main.cpp +++ b/basicsuite/shared/main.cpp @@ -135,6 +135,10 @@ int main(int argc, char **argv) QGuiApplication::setFont(font); } + QString videosPath = QStringLiteral("file://"); + QString defaultVideoUrl = QStringLiteral("file:///data/videos/Qt_video_720p.webm"); + videosPath.append("/data/videos"); + QSettings styleSettings; QString style = styleSettings.value("style").toString(); if (style.isEmpty() || style == "Default") @@ -149,6 +153,8 @@ int main(int argc, char **argv) applicationengine.rootContext()->setContextProperty("appFont", appFont); applicationengine.rootContext()->setContextProperty("availableStyles", QQuickStyle::availableStyles()); + applicationengine.rootContext()->setContextProperty("VideosLocation", videosPath); + applicationengine.rootContext()->setContextProperty("DefaultVideoUrl", defaultVideoUrl); QSettings themeColorSettings("QtLauncher", "colorSettings"); |