36 lines
917 B
C++
36 lines
917 B
C++
#include <QApplication>
|
|
#include <QQmlApplicationEngine>
|
|
#include <QTextCodec>
|
|
#include <QByteArray>
|
|
#include <QtWidgets/QApplication>
|
|
#include <QQuickView>
|
|
#include <QtQuickWidgets/QQuickWidget>
|
|
#include <QQmlComponent>
|
|
#include <QQmlContext>
|
|
#include <QtSerialPort/QSerialPort>
|
|
#include <QtSerialPort/QSerialPortInfo>
|
|
|
|
#include "sharedata.h"
|
|
#include "serialcontroller.h"
|
|
#include "lua_wraper.h"
|
|
|
|
|
|
ShareData gGlobal;
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QApplication app(argc, argv);
|
|
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
|
|
|
QQuickWidget *m_quickWidget=new QQuickWidget();
|
|
QUrl source("qrc:/main.qml");
|
|
m_quickWidget->setResizeMode(QQuickWidget::SizeRootObjectToView );
|
|
m_quickWidget->setSource(source);
|
|
m_quickWidget->rootContext()->setContextProperty("DataWrap",&gGlobal);
|
|
m_quickWidget->show();
|
|
gGlobal.SetQuickView(m_quickWidget);
|
|
|
|
return app.exec();
|
|
}
|