From 960fccda8cfa1f97900e9e78e255a2a386e86ddc Mon Sep 17 00:00:00 2001 From: rankun Date: Fri, 7 Aug 2020 17:52:52 +0800 Subject: [PATCH] feat: change qml dir --- QtScrcpy/{res/qml => }/MainWindow.qml | 0 QtScrcpy/QtScrcpy.pro | 4 ++++ QtScrcpy/main.cpp | 2 +- QtScrcpy/qml.qrc | 5 +++++ QtScrcpy/res/res.qrc | 1 - 5 files changed, 10 insertions(+), 2 deletions(-) rename QtScrcpy/{res/qml => }/MainWindow.qml (100%) create mode 100644 QtScrcpy/qml.qrc diff --git a/QtScrcpy/res/qml/MainWindow.qml b/QtScrcpy/MainWindow.qml similarity index 100% rename from QtScrcpy/res/qml/MainWindow.qml rename to QtScrcpy/MainWindow.qml diff --git a/QtScrcpy/QtScrcpy.pro b/QtScrcpy/QtScrcpy.pro index d0d5cdf..f1dd309 100644 --- a/QtScrcpy/QtScrcpy.pro +++ b/QtScrcpy/QtScrcpy.pro @@ -215,5 +215,9 @@ linux { # message("test") RESOURCES += \ + qml.qrc \ res/res.qrc +DISTFILES += \ + MainWindow.qml + diff --git a/QtScrcpy/main.cpp b/QtScrcpy/main.cpp index e9dea77..d4d48cb 100644 --- a/QtScrcpy/main.cpp +++ b/QtScrcpy/main.cpp @@ -73,7 +73,7 @@ int main(int argc, char *argv[]) g_oldMessageHandler = qInstallMessageHandler(myMessageOutput); Stream::init(); QApplication app(argc, argv); - QQmlApplicationEngine engine("qrc:/qml/MainWindow.qml"); + QQmlApplicationEngine engine("qrc:/MainWindow.qml"); // windows下通过qmake VERSION变量或者rc设置版本号和应用名称后,这里可以直接拿到 // mac下拿到的是CFBundleVersion的值 diff --git a/QtScrcpy/qml.qrc b/QtScrcpy/qml.qrc new file mode 100644 index 0000000..1786556 --- /dev/null +++ b/QtScrcpy/qml.qrc @@ -0,0 +1,5 @@ + + + MainWindow.qml + + diff --git a/QtScrcpy/res/res.qrc b/QtScrcpy/res/res.qrc index acf14f9..cc172df 100644 --- a/QtScrcpy/res/res.qrc +++ b/QtScrcpy/res/res.qrc @@ -24,7 +24,6 @@ qss/psblack/radiobutton_unchecked_disable.png i18n/QtScrcpy_en.qm i18n/QtScrcpy_zh.qm - qml/MainWindow.qml image/mainwindow/bg.png image/mainwindow/bg@2x.png image/mainwindow/bg@3x.png