mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-23 22:58:15 +00:00
feat(main_window): Hello World
This commit is contained in:
parent
097d141560
commit
21d99613d4
6 changed files with 52 additions and 0 deletions
14
tests/linphone.pro
Normal file
14
tests/linphone.pro
Normal 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
5
tests/resources.qrc
Normal 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
14
tests/src/main.cpp
Normal 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());
|
||||
}
|
||||
1
tests/src/views/main_window.cpp
Normal file
1
tests/src/views/main_window.cpp
Normal file
|
|
@ -0,0 +1 @@
|
|||
#include "main_window.h"
|
||||
5
tests/src/views/main_window.h
Normal file
5
tests/src/views/main_window.h
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#ifndef MAIN_WINDOW_H
|
||||
#define MAIN_WINDOW_H
|
||||
|
||||
|
||||
#endif // MAIN_WINDOW
|
||||
13
tests/ui/main_window.qml
Normal file
13
tests/ui/main_window.qml
Normal 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!"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue