native: add default qt projeckt
This commit is contained in:
parent
e93388066f
commit
d964cdfa4b
18 changed files with 852 additions and 0 deletions
15
native/QTprojeckt/NativGuiAlisa/src/app_environment.h
Normal file
15
native/QTprojeckt/NativGuiAlisa/src/app_environment.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
* This file is automatically generated by Qt Design Studio.
|
||||
* Do not change.
|
||||
*/
|
||||
|
||||
#include <QGuiApplication>
|
||||
|
||||
void set_qt_environment()
|
||||
{
|
||||
qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1");
|
||||
qputenv("QT_ENABLE_HIGHDPI_SCALING", "0");
|
||||
qputenv("QT_LOGGING_RULES", "qt.qml.connections=false");
|
||||
qputenv("QT_QUICK_CONTROLS_CONF", ":/qtquickcontrols2.conf");
|
||||
qputenv("QML_COMPAT_RESOLVE_URLS_ON_ASSIGNMENT", "1");
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* This file is automatically generated by Qt Design Studio.
|
||||
* Do not change.
|
||||
*/
|
||||
|
||||
#include "qqmlextensionplugin.h"
|
||||
|
||||
#ifdef BULD_QDS_COMPONENTS
|
||||
|
||||
Q_IMPORT_QML_PLUGIN(QtQuick_Studio_ComponentsPlugin)
|
||||
Q_IMPORT_QML_PLUGIN(QtQuick_Studio_EffectsPlugin)
|
||||
Q_IMPORT_QML_PLUGIN(QtQuick_Studio_ApplicationPlugin)
|
||||
Q_IMPORT_QML_PLUGIN(FlowViewPlugin)
|
||||
Q_IMPORT_QML_PLUGIN(QtQuick_Studio_LogicHelperPlugin)
|
||||
Q_IMPORT_QML_PLUGIN(QtQuick_Studio_MultiTextPlugin)
|
||||
Q_IMPORT_QML_PLUGIN(QtQuick_Studio_EventSimulatorPlugin)
|
||||
Q_IMPORT_QML_PLUGIN(QtQuick_Studio_EventSystemPlugin)
|
||||
|
||||
#endif
|
9
native/QTprojeckt/NativGuiAlisa/src/import_qml_plugins.h
Normal file
9
native/QTprojeckt/NativGuiAlisa/src/import_qml_plugins.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* This file is automatically generated by Qt Design Studio.
|
||||
* Do not change.
|
||||
*/
|
||||
|
||||
#include <QtQml/qqmlextensionplugin.h>
|
||||
|
||||
Q_IMPORT_QML_PLUGIN(contentPlugin)
|
||||
Q_IMPORT_QML_PLUGIN(NativGuiAlisaPlugin)
|
39
native/QTprojeckt/NativGuiAlisa/src/main.cpp
Normal file
39
native/QTprojeckt/NativGuiAlisa/src/main.cpp
Normal file
|
@ -0,0 +1,39 @@
|
|||
// Copyright (C) 2021 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
|
||||
|
||||
#include <QGuiApplication>
|
||||
#include <QQmlApplicationEngine>
|
||||
|
||||
#include "app_environment.h"
|
||||
#include "import_qml_components_plugins.h"
|
||||
#include "import_qml_plugins.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
set_qt_environment();
|
||||
|
||||
QGuiApplication app(argc, argv);
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
const QUrl url(u"qrc:/qt/qml/Main/main.qml"_qs);
|
||||
QObject::connect(
|
||||
&engine,
|
||||
&QQmlApplicationEngine::objectCreated,
|
||||
&app,
|
||||
[url](QObject *obj, const QUrl &objUrl) {
|
||||
if (!obj && url == objUrl)
|
||||
QCoreApplication::exit(-1);
|
||||
},
|
||||
Qt::QueuedConnection);
|
||||
|
||||
engine.addImportPath(QCoreApplication::applicationDirPath() + "/qml");
|
||||
engine.addImportPath(":/");
|
||||
|
||||
engine.load(url);
|
||||
|
||||
if (engine.rootObjects().isEmpty()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return app.exec();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue