[vlmc-devel] MediaLibraryView: Map the model before creating the view
Hugo Beauzée-Luyssen
git at videolan.org
Tue Jul 12 00:26:37 CEST 2016
vlmc | branch: medialibrary | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Jul 11 19:57:11 2016 +0200| [81446f99c3655310c644e477f34800d9302584d9] | committer: Hugo Beauzée-Luyssen
MediaLibraryView: Map the model before creating the view
> https://code.videolan.org/videolan/vlmc/commit/81446f99c3655310c644e477f34800d9302584d9
---
src/Gui/library/MediaLibraryView.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/Gui/library/MediaLibraryView.cpp b/src/Gui/library/MediaLibraryView.cpp
index 35b1958..1e2bea7 100644
--- a/src/Gui/library/MediaLibraryView.cpp
+++ b/src/Gui/library/MediaLibraryView.cpp
@@ -41,10 +41,11 @@ MediaLibraryView::MediaLibraryView(QWidget *parent)
auto layout = new QBoxLayout( QBoxLayout::TopToBottom, this );
layout->addWidget( container );
- view->setSource( QUrl( "qrc:/qml/MediaLibraryView" ) );
- view->setResizeMode(QQuickView::SizeRootObjectToView);
auto ctx = view->rootContext();
ctx->setContextProperty( "mlModel", Core::instance()->mediaLibrary()->model( MediaLibrary::MediaType::Video ) );
+
+ view->setSource( QUrl( "qrc:/qml/MediaLibraryView" ) );
+ view->setResizeMode(QQuickView::SizeRootObjectToView);
}
MediaLibraryView::~MediaLibraryView()
More information about the Vlmc-devel
mailing list