From 4ebb0c39673780d9ed58a69d8189cccf9dc978c6 Mon Sep 17 00:00:00 2001 From: APTX Date: Thu, 18 Aug 2011 16:28:40 +0200 Subject: [PATCH] Store qml files in the executable. --- AniAdd.pro | 4 ++++ mainwindow.cpp | 3 +-- resources.qrc | 9 +++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 resources.qrc diff --git a/AniAdd.pro b/AniAdd.pro index 048e39b..17ec6b1 100644 --- a/AniAdd.pro +++ b/AniAdd.pro @@ -63,3 +63,7 @@ FORMS += \ LIBS += -lanidbudpclient include(qtsingleapplication/src/qtsingleapplication.pri) + +RESOURCES += \ + resources.qrc + diff --git a/mainwindow.cpp b/mainwindow.cpp index f469bc2..26dc26a 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -29,8 +29,7 @@ MainWindow::MainWindow(QWidget *parent) : ctxt->setContextProperty("mainWindow", this); ctxt->setContextProperty("fileModel", qApp->fileModel()); - //ui->declarativeView->setSource(QUrl("qrc:/qml/main.qml")); - ui->declarativeView->setSource(QUrl("qml/AniAdd/main.qml")); + ui->declarativeView->setSource(QUrl("qrc:/qml/AniAdd/main.qml")); ui->declarativeView->setResizeMode(QDeclarativeView::SizeRootObjectToView); ui->declarativeView->setViewport(new QGLWidget()); diff --git a/resources.qrc b/resources.qrc new file mode 100644 index 0000000..991335c --- /dev/null +++ b/resources.qrc @@ -0,0 +1,9 @@ + + + qml/AniAdd/main.qml + qml/AniAdd/Components/FileDelegate.qml + qml/AniAdd/Components/ProgressBar.qml + qml/AniAdd/Components/StatusIndicator.qml + qml/AniAdd/images/bgchar.svg + + -- 2.52.0