#include #include #include #include #include #include #include #include #include #include #include #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(); }