diff options
Diffstat (limited to 'src/frontend/qtquick')
-rw-r--r-- | src/frontend/qtquick/main.cpp | 7 | ||||
-rw-r--r-- | src/frontend/qtquick/main.qml | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/frontend/qtquick/main.cpp b/src/frontend/qtquick/main.cpp index c2c84fc..e1d43f7 100644 --- a/src/frontend/qtquick/main.cpp +++ b/src/frontend/qtquick/main.cpp @@ -1,5 +1,8 @@ #include <QGuiApplication> #include <QQmlApplicationEngine> +#include <QQmlContext> + +#include "../../../config.h" int main(int argc, char *argv[]) { @@ -9,6 +12,10 @@ int main(int argc, char *argv[]) QGuiApplication app(argc, argv); QQmlApplicationEngine engine; + + // forward values to qml engine + engine.rootContext()->setContextProperty("PROJECT_TITLE", PROJECT_TITLE); + const QUrl url(QStringLiteral("qrc:/main.qml")); QObject::connect( &engine, diff --git a/src/frontend/qtquick/main.qml b/src/frontend/qtquick/main.qml index 18936fd..3775f2b 100644 --- a/src/frontend/qtquick/main.qml +++ b/src/frontend/qtquick/main.qml @@ -7,7 +7,7 @@ Window { height: 480 visible: true // TODO grab this from config.h - title: qsTr("Assignment List") + title: PROJECT_TITLE // DropDown for groups (including an "all" option) Item { |