[vlmc-devel] QQuickView: SetContextProperty before setSource

Yikai Lu git at videolan.org
Sun Jul 10 18:03:34 CEST 2016


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Sat Jul  9 18:32:06 2016 +0900| [d6cef4ad4c4ec7fb93ddfa38b8f1659ab8990115] | committer: Yikai Lu

QQuickView: SetContextProperty before setSource

> https://code.videolan.org/videolan/vlmc/commit/d6cef4ad4c4ec7fb93ddfa38b8f1659ab8990115
---

 src/Gui/timeline/Timeline.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Gui/timeline/Timeline.cpp b/src/Gui/timeline/Timeline.cpp
index 2fa174e..c0a9e9f 100644
--- a/src/Gui/timeline/Timeline.cpp
+++ b/src/Gui/timeline/Timeline.cpp
@@ -37,8 +37,8 @@ Timeline::Timeline( QWidget *parent )
 {
     m_container->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
     m_container->setFocusPolicy( Qt::TabFocus );
-    m_view->setSource( QUrl( QStringLiteral( "qrc:/QML/main.qml" ) ) );
     m_view->rootContext()->setContextProperty( "workflow", Core::instance()->workflow() );
+    m_view->setSource( QUrl( QStringLiteral( "qrc:/QML/main.qml" ) ) );
 }
 
 Timeline::~Timeline()



More information about the Vlmc-devel mailing list