feat(main_window): Hello World

This commit is contained in:
Ronan Abhamon 2016-09-05 11:51:28 +02:00
parent 097d141560
commit 21d99613d4
6 changed files with 52 additions and 0 deletions

14
tests/linphone.pro Normal file
View file

@ -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

5
tests/resources.qrc Normal file
View file

@ -0,0 +1,5 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/">
<file>ui/main_window.qml</file>
</qresource>
</RCC>

14
tests/src/main.cpp Normal file
View file

@ -0,0 +1,14 @@
#include <cstdlib>
#include <QGuiApplication>
#include <QQmlApplicationEngine>
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());
}

View file

@ -0,0 +1 @@
#include "main_window.h"

View file

@ -0,0 +1,5 @@
#ifndef MAIN_WINDOW_H
#define MAIN_WINDOW_H
#endif // MAIN_WINDOW

13
tests/ui/main_window.qml Normal file
View file

@ -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!"
}
}