Исправлена структура каталогов

This commit is contained in:
2024-05-16 16:26:38 +02:00
parent 53659cea38
commit fe298f0631
17 changed files with 22 additions and 66 deletions

View File

@@ -11,8 +11,8 @@ find_package(Qt6 6.5 REQUIRED COMPONENTS Quick)
qt_standard_project_setup(REQUIRES 6.5) qt_standard_project_setup(REQUIRES 6.5)
qt_add_executable(appnooLight qt_add_executable(appnooLight
main.cpp src/main.cpp
qml.qrc resources/resources.qrc
) )
if (ANDROID) if (ANDROID)

View File

@@ -1,44 +0,0 @@
QT += quick
CONFIG += c++11
# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += main.cpp
RESOURCES += qml.qrc
# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =
# Additional import path used to resolve QML modules just for Qt Quick Designer
QML_DESIGNER_IMPORT_PATH =
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
DISTFILES += \
android/AndroidManifest.xml \
android/gradle/wrapper/gradle-wrapper.jar \
android/gradlew \
android/res/values/libs.xml \
android/build.gradle \
android/gradle/wrapper/gradle-wrapper.properties \
android/gradlew.bat
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
ANDROID_EXTRA_LIBS += $$ANDROID_SDK_ROOT/android_openssl/latest/arm/libssl_1_1.so \
$$ANDROID_SDK_ROOT/android_openssl/latest/arm/libcrypto_1_1.so
ANDROID_ABIS = armeabi-v7a

16
qml.qrc
View File

@@ -1,16 +0,0 @@
<RCC>
<qresource prefix="/">
<file>main.qml</file>
<file>qtquickcontrols2.conf</file>
<file>HomeForm.qml</file>
<file>SettingsForm.qml</file>
<file>SubtitledItemDelegate.qml</file>
<file>LightsModel.qml</file>
<file>LightGroup.qml</file>
<file>GradientButton.qml</file>
<file>lamp.png</file>
<file>Off.png</file>
<file>NooLiteClient.qml</file>
<file>ServiceForm.qml</file>
</qresource>
</RCC>

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -33,7 +33,7 @@ Item {
anchors.margins: 5 anchors.margins: 5
width: height width: height
source: "Off.png" source: "/images/off.png"
} }
} }
@@ -64,7 +64,7 @@ Item {
height: button.height * 0.5 height: button.height * 0.5
width: height width: height
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
source: "lamp.png" source: "/images/lamp.png"
} }
Label { Label {

View File

@@ -62,7 +62,7 @@ ApplicationWindow {
"quit": () => { Qt.quit() } "quit": () => { Qt.quit() }
} }
logo: "qrc:/lamp.png" logo: "/images/lamp.png"
appName: qsTr("nooLight v1.0") appName: qsTr("nooLight v1.0")
model: ListModel { model: ListModel {

16
resources/resources.qrc Normal file
View File

@@ -0,0 +1,16 @@
<RCC>
<qresource prefix="/">
<file>qml/main.qml</file>
<file>qtquickcontrols2.conf</file>
<file>qml/HomeForm.qml</file>
<file>qml/SettingsForm.qml</file>
<file>qml/SubtitledItemDelegate.qml</file>
<file>qml/LightsModel.qml</file>
<file>qml/LightGroup.qml</file>
<file>qml/GradientButton.qml</file>
<file>images/lamp.png</file>
<file>images/off.png</file>
<file>qml/NooLiteClient.qml</file>
<file>qml/ServiceForm.qml</file>
</qresource>
</RCC>

View File

@@ -9,7 +9,7 @@ int main(int argc, char *argv[])
app.setOrganizationDomain("inc"); app.setOrganizationDomain("inc");
QQmlApplicationEngine engine; QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml")));
if (engine.rootObjects().isEmpty()) { if (engine.rootObjects().isEmpty()) {
return -1; return -1;
} }