diff options
author | Louie S <louie@example.com> | 2024-07-24 11:58:00 -0400 |
---|---|---|
committer | Louie S <louie@example.com> | 2024-07-25 17:11:23 -0400 |
commit | 68ce496b5dd082881dde7536677f295bc40ee055 (patch) | |
tree | 53128fdd56f753b97e53f31812d7855f13583ffc /src/frontend/qtquick | |
parent | 02add8bb097104dc02066fe390ec01465910fc76 (diff) |
First commit of qtquick branch
Diffstat (limited to 'src/frontend/qtquick')
-rw-r--r-- | src/frontend/qtquick/main.cpp | 25 | ||||
-rw-r--r-- | src/frontend/qtquick/main.qml | 25 | ||||
-rw-r--r-- | src/frontend/qtquick/qml.qrc | 5 |
3 files changed, 55 insertions, 0 deletions
diff --git a/src/frontend/qtquick/main.cpp b/src/frontend/qtquick/main.cpp new file mode 100644 index 0000000..c2c84fc --- /dev/null +++ b/src/frontend/qtquick/main.cpp @@ -0,0 +1,25 @@ +#include <QGuiApplication> +#include <QQmlApplicationEngine> + +int main(int argc, char *argv[]) +{ +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); +#endif + QGuiApplication app(argc, argv); + + QQmlApplicationEngine engine; + const QUrl url(QStringLiteral("qrc:/main.qml")); + QObject::connect( + &engine, + &QQmlApplicationEngine::objectCreated, + &app, + [url](QObject *obj, const QUrl &objUrl) { + if (!obj && url == objUrl) + QCoreApplication::exit(-1); + }, + Qt::QueuedConnection); + engine.load(url); + + return app.exec(); +} diff --git a/src/frontend/qtquick/main.qml b/src/frontend/qtquick/main.qml new file mode 100644 index 0000000..18936fd --- /dev/null +++ b/src/frontend/qtquick/main.qml @@ -0,0 +1,25 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Window 2.15 + +Window { + width: 640 + height: 480 + visible: true + // TODO grab this from config.h + title: qsTr("Assignment List") + + // DropDown for groups (including an "all" option) + Item { + width: parent.width + height: 50 + ComboBox { + anchors.fill: parent + id: groupComboBox + model: [ + "all" + //... + ] + } + } +} diff --git a/src/frontend/qtquick/qml.qrc b/src/frontend/qtquick/qml.qrc new file mode 100644 index 0000000..5f6483a --- /dev/null +++ b/src/frontend/qtquick/qml.qrc @@ -0,0 +1,5 @@ +<RCC> + <qresource prefix="/"> + <file>main.qml</file> + </qresource> +</RCC> |