From 21d99613d43ba064837cddf97bc0c2cf7fd50e2d Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Mon, 5 Sep 2016 11:51:28 +0200 Subject: [PATCH] feat(main_window): Hello World --- tests/linphone.pro | 14 ++++++++++++++ tests/resources.qrc | 5 +++++ tests/src/main.cpp | 14 ++++++++++++++ tests/src/views/main_window.cpp | 1 + tests/src/views/main_window.h | 5 +++++ tests/ui/main_window.qml | 13 +++++++++++++ 6 files changed, 52 insertions(+) create mode 100644 tests/linphone.pro create mode 100644 tests/resources.qrc create mode 100644 tests/src/main.cpp create mode 100644 tests/src/views/main_window.cpp create mode 100644 tests/src/views/main_window.h create mode 100644 tests/ui/main_window.qml diff --git a/tests/linphone.pro b/tests/linphone.pro new file mode 100644 index 000000000..59b7941ab --- /dev/null +++ b/tests/linphone.pro @@ -0,0 +1,14 @@ +QT += core gui quick widgets + +TARGET = linphone +TEMPLATE = app + +SOURCES += \ + src/main.cpp \ + src/views/main_window.cpp + +HEADERS += \ + src/views/main_window.h + +RESOURCES += \ + resources.qrc diff --git a/tests/resources.qrc b/tests/resources.qrc new file mode 100644 index 000000000..e522f90fc --- /dev/null +++ b/tests/resources.qrc @@ -0,0 +1,5 @@ + + + ui/main_window.qml + + diff --git a/tests/src/main.cpp b/tests/src/main.cpp new file mode 100644 index 000000000..5232da415 --- /dev/null +++ b/tests/src/main.cpp @@ -0,0 +1,14 @@ +#include + +#include +#include + +int main (int argc, char *argv[]) { + QGuiApplication app(argc, argv); + QQmlApplicationEngine engine(QUrl("qrc:/ui/main_window.qml")); + + if (engine.rootObjects().isEmpty()) + exit(EXIT_FAILURE); + + exit(app.exec()); +} diff --git a/tests/src/views/main_window.cpp b/tests/src/views/main_window.cpp new file mode 100644 index 000000000..e1677444c --- /dev/null +++ b/tests/src/views/main_window.cpp @@ -0,0 +1 @@ +#include "main_window.h" diff --git a/tests/src/views/main_window.h b/tests/src/views/main_window.h new file mode 100644 index 000000000..bc5b820f4 --- /dev/null +++ b/tests/src/views/main_window.h @@ -0,0 +1,5 @@ +#ifndef MAIN_WINDOW_H +#define MAIN_WINDOW_H + + +#endif // MAIN_WINDOW diff --git a/tests/ui/main_window.qml b/tests/ui/main_window.qml new file mode 100644 index 000000000..5acc65cc0 --- /dev/null +++ b/tests/ui/main_window.qml @@ -0,0 +1,13 @@ +import QtQuick 2.5 +import QtQuick.Window 2.2 + +Window { + visible: true + width: 800 + height: 600 + + Text { + anchors.centerIn: parent + text: "Hello World!" + } +}