From 11abef849795c64743135207d1c4fb1c1eae7c79 Mon Sep 17 00:00:00 2001 From: Kevin Whitaker Date: Mon, 4 Nov 2019 10:21:20 -0500 Subject: [PATCH] Initial import --- CMakeLists.txt | 7 +++++++ src/CMakeLists.txt | 4 ++++ src/main.cpp | 9 +++++++++ src/qml/main.qml | 14 ++++++++++++++ src/resources.qrc | 5 +++++ 5 files changed, 39 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 src/CMakeLists.txt create mode 100644 src/main.cpp create mode 100644 src/qml/main.qml create mode 100644 src/resources.qrc diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..c52d0fb --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.0) + +find_package(Qt5 REQUIRED COMPONENTS Gui Qml) + +set(CMAKE_AUTOMOC ON) + +add_subdirectory(src) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..7150aeb --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,4 @@ +qt5_add_resources(qiflora_SRCS resources.qrc) +add_executable(qiflora main.cpp ${qiflora_SRCS}) +target_link_libraries(qiflora Qt5::Qml Qt5::Gui) + diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..f6aa73e --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,9 @@ +#include +#include + +int main(int argc, char *argv[]) +{ + QGuiApplication app(argc, argv); + QQmlApplicationEngine engine(QUrl(QStringLiteral("qrc:/qml/main.qml"))); + return app.exec(); +} diff --git a/src/qml/main.qml b/src/qml/main.qml new file mode 100644 index 0000000..e8115ee --- /dev/null +++ b/src/qml/main.qml @@ -0,0 +1,14 @@ +import QtQuick 2.0 +import QtQuick.Window 2.0 + +Window +{ + visible: true + width: 300 + height: 240 + + Rectangle { + anchors.fill: parent + color: "steelblue" + } +} diff --git a/src/resources.qrc b/src/resources.qrc new file mode 100644 index 0000000..7c75584 --- /dev/null +++ b/src/resources.qrc @@ -0,0 +1,5 @@ + + + qml/main.qml + +