forked from patrickelectric/AtCore-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
30 lines (23 loc) · 734 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <QApplication>
#include <QQuickView>
#include <QtQml>
#include <QUrl>
#include <QDir>
#include <QDebug>
#include <AtCore/AtCore>
#include "gridmesh.h"
#include "linemesh.h"
Q_DECL_EXPORT int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(viewer3d);
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argc, argv);
qmlRegisterType<AtCore>("org.kde.atcore", 1, 0, "AtCore");
qmlRegisterType<GridMesh>("GridMesh", 1, 0, "GridMesh");
qmlRegisterType<LineMesh>("LineMesh", 1, 0, "LineMesh");
QQuickView view;
view.setResizeMode(QQuickView::SizeRootObjectToView);
view.setSource(QUrl(QStringLiteral("qrc:///main.qml")));
view.show();
return app.exec();
}