diff --git a/native/.gitignore b/native/.gitignore new file mode 100644 index 0000000..b7a394a --- /dev/null +++ b/native/.gitignore @@ -0,0 +1,4 @@ + + +**/build +**/imports \ No newline at end of file diff --git a/native/QTprojeckt/NativGuiAlisa/CMakeLists.txt b/native/QTprojeckt/NativGuiAlisa/CMakeLists.txt new file mode 100644 index 0000000..36488d1 --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/CMakeLists.txt @@ -0,0 +1,56 @@ +cmake_minimum_required(VERSION 3.21.1) + +option(LINK_INSIGHT "Link Qt Insight Tracker library" ON) +option(BUILD_QDS_COMPONENTS "Build design studio components" ON) + +project(NativGuiAlisaApp LANGUAGES CXX) + +set(CMAKE_AUTOMOC ON) + +find_package(Qt6 6.2 REQUIRED COMPONENTS Core Gui Qml Quick) + +if (Qt6_VERSION VERSION_GREATER_EQUAL 6.3) + qt_standard_project_setup() +endif() + +qt_add_executable(NativGuiAlisaApp src/main.cpp) + +qt_add_resources(NativGuiAlisaApp "configuration" + PREFIX "/" + FILES + qtquickcontrols2.conf +) + +target_link_libraries(NativGuiAlisaApp PRIVATE + Qt6::Core + Qt6::Gui + Qt6::Qml + Qt6::Quick +) + +set(QT_QML_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/qml) +set(QML_IMPORT_PATH ${QT_QML_OUTPUT_DIRECTORY} + CACHE STRING "Import paths for Qt Creator's code model" + FORCE +) + +if (BUILD_QDS_COMPONENTS) + include(${CMAKE_CURRENT_SOURCE_DIR}/qmlcomponents) +endif() + +include(${CMAKE_CURRENT_SOURCE_DIR}/qmlmodules) + +if (LINK_INSIGHT) + include(${CMAKE_CURRENT_SOURCE_DIR}/insight) +endif () + +include(GNUInstallDirs) +install(TARGETS NativGuiAlisaApp + BUNDLE DESTINATION . + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) + +# make IDEs aware of the QML import path +set(QML_IMPORT_PATH ${PROJECT_BINARY_DIR}/qml CACHE PATH + "Path to the custom QML components defined by the project") diff --git a/native/QTprojeckt/NativGuiAlisa/CMakeLists.txt.user b/native/QTprojeckt/NativGuiAlisa/CMakeLists.txt.user new file mode 100644 index 0000000..e49b302 --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/CMakeLists.txt.user @@ -0,0 +1,389 @@ + + + + + + EnvironmentId + {bc574a5d-0084-4a4c-aafc-6d183d99e456} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + 0 + false + true + false + 2 + true + true + 0 + 8 + true + false + 1 + true + true + true + *.md, *.MD, Makefile + false + true + true + + + + ProjectExplorer.Project.Target.0 + + Desktop + Desktop + Desktop + {1b914a2b-b5d2-4819-b494-223a423bf752} + 0 + 0 + 0 + + Debug + 2 + false + + -DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_BUILD_TYPE:STRING=Debug +-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake +-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} +-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} +-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} + 0 + E:\Programming\alisa\Alisa\native\QTprojeckt\NativGuiAlisa\build\Desktop-Debug + + + + + all + + false + + true + CMakeProjectManager.MakeStep + + 1 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + + + clean + + false + + true + CMakeProjectManager.MakeStep + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Debug + CMakeProjectManager.CMakeBuildConfiguration + + + Release + 2 + false + + -DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_BUILD_TYPE:STRING=Release +-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake +-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} +-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} +-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} + E:\Programming\alisa\Alisa\native\QTprojeckt\NativGuiAlisa\build\Desktop-Release + + + + + all + + false + + true + CMakeProjectManager.MakeStep + + 1 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + + + clean + + false + + true + CMakeProjectManager.MakeStep + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Release + CMakeProjectManager.CMakeBuildConfiguration + + + RelWithDebInfo + 2 + false + + -DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo +-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake +-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} +-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} +-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} + E:\Programming\alisa\Alisa\native\QTprojeckt\NativGuiAlisa\build\Desktop-RelWithDebInfo + + + + + all + + false + + true + CMakeProjectManager.MakeStep + + 1 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + + + clean + + false + + true + CMakeProjectManager.MakeStep + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Release with Debug Information + CMakeProjectManager.CMakeBuildConfiguration + + + RelWithDebInfo + 2 + false + + -DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo +-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake +-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} +-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} +-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} + 0 + E:\Programming\alisa\Alisa\native\QTprojeckt\NativGuiAlisa\build\Desktop-Profile + + + + + all + + false + + true + CMakeProjectManager.MakeStep + + 1 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + + + clean + + false + + true + CMakeProjectManager.MakeStep + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Profile + CMakeProjectManager.CMakeBuildConfiguration + + + MinSizeRel + 2 + false + + -DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_BUILD_TYPE:STRING=MinSizeRel +-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake +-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} +-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} +-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} + E:\Programming\alisa\Alisa\native\QTprojeckt\NativGuiAlisa\build\Desktop-MinSizeRel + + + + + all + + false + + true + CMakeProjectManager.MakeStep + + 1 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + + + clean + + false + + true + CMakeProjectManager.MakeStep + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Minimum Size Release + CMakeProjectManager.CMakeBuildConfiguration + + 5 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + true + true + 0 + true + + 2 + + false + -e cpu-cycles --call-graph "dwarf,4096" -F 250 + + ProjectExplorer.CustomExecutableRunConfiguration + + false + true + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/native/QTprojeckt/NativGuiAlisa/NativGuiAlisa.qmlproject b/native/QTprojeckt/NativGuiAlisa/NativGuiAlisa.qmlproject new file mode 100644 index 0000000..9162983 --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/NativGuiAlisa.qmlproject @@ -0,0 +1,123 @@ +import QmlProject + +Project { + mainFile: "content/App.qml" + mainUiFile: "content/Screen01.ui.qml" + + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "content" + } + + QmlFiles { + directory: "imports" + } + + JavaScriptFiles { + directory: "content" + } + + JavaScriptFiles { + directory: "imports" + } + + ImageFiles { + directory: "content" + } + + ImageFiles { + directory: "asset_imports" + } + + Files { + filter: "*.conf" + files: ["qtquickcontrols2.conf"] + } + + Files { + filter: "qmldir" + directory: "." + } + + Files { + filter: "*.ttf;*.otf" + } + + Files { + filter: "*.wav;*.mp3" + } + + Files { + filter: "*.mp4" + } + + Files { + filter: "*.glsl;*.glslv;*.glslf;*.vsh;*.fsh;*.vert;*.frag" + } + + Files { + filter: "*.qsb" + } + + Files { + filter: "*.json" + } + + Files { + filter: "*.mesh" + directory: "asset_imports" + } + + Files { + filter: "*.qad" + directory: "asset_imports" + } + + Files { + filter: "*.qml" + directory: "asset_imports" + } + + Environment { + QT_QUICK_CONTROLS_CONF: "qtquickcontrols2.conf" + QT_AUTO_SCREEN_SCALE_FACTOR: "1" + QML_COMPAT_RESOLVE_URLS_ON_ASSIGNMENT: "1" + QT_LOGGING_RULES: "qt.qml.connections=false" + QT_ENABLE_HIGHDPI_SCALING: "0" + /* Useful for debugging + QSG_VISUALIZE=batches + QSG_VISUALIZE=clip + QSG_VISUALIZE=changes + QSG_VISUALIZE=overdraw + */ + } + + qt6Project: true + + /* List of plugin directories passed to QML runtime */ + importPaths: [ "imports", "asset_imports" ] + + /* Required for deployment */ + targetDirectory: "/opt/NativGuiAlisa" + + qdsVersion: "4.3" + + quickVersion: "6.2" + + /* If any modules the project imports require widgets (e.g. QtCharts), widgetApp must be true */ + widgetApp: true + + /* args: Specifies command line arguments for qsb tool to generate shaders. + files: Specifies target files for qsb tool. If path is included, it must be relative to this file. + Wildcard '*' can be used in the file name part of the path. + e.g. files: [ "content/shaders/*.vert", "*.frag" ] */ + ShaderTool { + args: "-s --glsl \"100 es,120,150\" --hlsl 50 --msl 12" + files: [ "content/shaders/*" ] + } + + multilanguageSupport: true + supportedLanguages: ["en"] + primaryLanguage: "en" + +} diff --git a/native/QTprojeckt/NativGuiAlisa/asset_imports/asset_imports.txt b/native/QTprojeckt/NativGuiAlisa/asset_imports/asset_imports.txt new file mode 100644 index 0000000..84c843f --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/asset_imports/asset_imports.txt @@ -0,0 +1 @@ +Imported 3D assets and components imported from bundles will be created in this folder. diff --git a/native/QTprojeckt/NativGuiAlisa/content/App.qml b/native/QTprojeckt/NativGuiAlisa/content/App.qml new file mode 100644 index 0000000..8ffc4dc --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/content/App.qml @@ -0,0 +1,19 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +import QtQuick 6.2 +import NativGuiAlisa + +Window { + width: mainScreen.width + height: mainScreen.height + + visible: true + title: "NativGuiAlisa" + + Screen01 { + id: mainScreen + } + +} + diff --git a/native/QTprojeckt/NativGuiAlisa/content/CMakeLists.txt b/native/QTprojeckt/NativGuiAlisa/content/CMakeLists.txt new file mode 100644 index 0000000..9f2a563 --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/content/CMakeLists.txt @@ -0,0 +1,14 @@ +### This file is automatically generated by Qt Design Studio. +### Do not change + +qt_add_library(content STATIC) +qt6_add_qml_module(content + URI "content" + VERSION 1.0 + RESOURCE_PREFIX "/qt/qml" + QML_FILES + App.qml + Screen01.ui.qml + RESOURCES + fonts/fonts.txt +) diff --git a/native/QTprojeckt/NativGuiAlisa/content/Screen01.ui.qml b/native/QTprojeckt/NativGuiAlisa/content/Screen01.ui.qml new file mode 100644 index 0000000..fa58a78 --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/content/Screen01.ui.qml @@ -0,0 +1,71 @@ +/* +This is a UI file (.ui.qml) that is intended to be edited in Qt Design Studio only. +It is supposed to be strictly declarative and only uses a subset of QML. If you edit +this file manually, you might introduce QML code that is not supported by Qt Design Studio. +Check out https://doc.qt.io/qtcreator/creator-quick-ui-forms.html for details on .ui.qml files. +*/ + +import QtQuick 6.2 +import QtQuick.Controls 6.2 +import NativGuiAlisa + +Rectangle { + id: rectangle + width: Constants.width + height: Constants.height + + color: Constants.backgroundColor + + Button { + id: button + text: qsTr("Press me") + anchors.verticalCenter: parent.verticalCenter + checkable: true + anchors.horizontalCenter: parent.horizontalCenter + + Connections { + target: button + onClicked: animation.start() + } + } + + Text { + id: label + text: qsTr("Hello NativGuiAlisa") + anchors.top: button.bottom + font.family: Constants.font.family + anchors.topMargin: 45 + anchors.horizontalCenter: parent.horizontalCenter + + SequentialAnimation { + id: animation + + ColorAnimation { + id: colorAnimation1 + target: rectangle + property: "color" + to: "#2294c6" + from: Constants.backgroundColor + } + + ColorAnimation { + id: colorAnimation2 + target: rectangle + property: "color" + to: Constants.backgroundColor + from: "#2294c6" + } + } + } + states: [ + State { + name: "clicked" + when: button.checked + + PropertyChanges { + target: label + text: qsTr("Button Checked") + } + } + ] +} diff --git a/native/QTprojeckt/NativGuiAlisa/content/fonts/fonts.txt b/native/QTprojeckt/NativGuiAlisa/content/fonts/fonts.txt new file mode 100644 index 0000000..ab96122 --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/content/fonts/fonts.txt @@ -0,0 +1 @@ +Fonts in this folder are loaded automatically. diff --git a/native/QTprojeckt/NativGuiAlisa/insight b/native/QTprojeckt/NativGuiAlisa/insight new file mode 100644 index 0000000..8245e31 --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/insight @@ -0,0 +1,19 @@ +### This file is automatically generated by Qt Design Studio. +### Do not change + +if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/qtinsight.conf) + if (QT_VERSION GREATER_EQUAL 6.5.0) + find_package(Qt6 REQUIRED COMPONENTS InsightTracker) + + qt_add_resources(${CMAKE_PROJECT_NAME} "configuration" + PREFIX "/" + FILES + qtinsight.conf + ) + target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE + Qt6::InsightTracker + ) + else() + message(WARNING "You need Qt 6.5.0 or newer to build the application.") + endif() +endif() diff --git a/native/QTprojeckt/NativGuiAlisa/main.qml b/native/QTprojeckt/NativGuiAlisa/main.qml new file mode 100644 index 0000000..2c4f857 --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/main.qml @@ -0,0 +1,8 @@ +/* This file is generated and only relevant for integrating the project into a Qt 6 and cmake based +C++ project. */ + +import QtQuick +import content + +App { +} diff --git a/native/QTprojeckt/NativGuiAlisa/qmlcomponents b/native/QTprojeckt/NativGuiAlisa/qmlcomponents new file mode 100644 index 0000000..2e940be --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/qmlcomponents @@ -0,0 +1,34 @@ +### This file is automatically generated by Qt Design Studio. +### Do not change + +message("Building designer components.") + +set(QT_QML_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/qml") + +include(FetchContent) +FetchContent_Declare( + ds + GIT_TAG qds-4.4 + GIT_REPOSITORY https://code.qt.io/qt-labs/qtquickdesigner-components.git +) + +FetchContent_GetProperties(ds) +FetchContent_Populate(ds) + +target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE + QuickStudioComponentsplugin + QuickStudioEffectsplugin + QuickStudioApplicationplugin + FlowViewplugin + QuickStudioLogicHelperplugin + QuickStudioMultiTextplugin + QuickStudioEventSimulatorplugin + QuickStudioEventSystemplugin + QuickStudioUtilsplugin +) + +add_subdirectory(${ds_SOURCE_DIR} ${ds_BINARY_DIR}) + +target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE + BULD_QDS_COMPONENTS=true +) diff --git a/native/QTprojeckt/NativGuiAlisa/qmlmodules b/native/QTprojeckt/NativGuiAlisa/qmlmodules new file mode 100644 index 0000000..5bf4317 --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/qmlmodules @@ -0,0 +1,18 @@ +### This file is automatically generated by Qt Design Studio. +### Do not change + +qt6_add_qml_module(${CMAKE_PROJECT_NAME} + URI "Main" + VERSION 1.0 + RESOURCE_PREFIX "/qt/qml" + NO_PLUGIN + QML_FILES main.qml +) + +add_subdirectory(content) +add_subdirectory(imports) + +target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE + contentplugin + NativGuiAlisaplugin +) diff --git a/native/QTprojeckt/NativGuiAlisa/qtquickcontrols2.conf b/native/QTprojeckt/NativGuiAlisa/qtquickcontrols2.conf new file mode 100644 index 0000000..6f0d6fe --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/qtquickcontrols2.conf @@ -0,0 +1,13 @@ +; This file can be edited to change the style of the application +; Read "Qt Quick Controls 2 Configuration File" for details: +; http://doc.qt.io/qt-5/qtquickcontrols2-configuration.html + +[Controls] +Style=Material + +[Material] +Theme=Light +;Accent=BlueGrey +;Primary=BlueGray +;Foreground=Brown +;Background=Grey diff --git a/native/QTprojeckt/NativGuiAlisa/src/app_environment.h b/native/QTprojeckt/NativGuiAlisa/src/app_environment.h new file mode 100644 index 0000000..6b42bff --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/src/app_environment.h @@ -0,0 +1,15 @@ +/* + * This file is automatically generated by Qt Design Studio. + * Do not change. +*/ + +#include + +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"); +} diff --git a/native/QTprojeckt/NativGuiAlisa/src/import_qml_components_plugins.h b/native/QTprojeckt/NativGuiAlisa/src/import_qml_components_plugins.h new file mode 100644 index 0000000..25d0a98 --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/src/import_qml_components_plugins.h @@ -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 diff --git a/native/QTprojeckt/NativGuiAlisa/src/import_qml_plugins.h b/native/QTprojeckt/NativGuiAlisa/src/import_qml_plugins.h new file mode 100644 index 0000000..5602249 --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/src/import_qml_plugins.h @@ -0,0 +1,9 @@ +/* + * This file is automatically generated by Qt Design Studio. + * Do not change. +*/ + +#include + +Q_IMPORT_QML_PLUGIN(contentPlugin) +Q_IMPORT_QML_PLUGIN(NativGuiAlisaPlugin) diff --git a/native/QTprojeckt/NativGuiAlisa/src/main.cpp b/native/QTprojeckt/NativGuiAlisa/src/main.cpp new file mode 100644 index 0000000..2091020 --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/src/main.cpp @@ -0,0 +1,39 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#include +#include + +#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(); +}