From c7c9353ca122a01bab755285af7a8ab90f770bae Mon Sep 17 00:00:00 2001 From: jared Date: Fri, 12 May 2023 01:25:03 +0800 Subject: [PATCH] add HelloTaoQuick3 --- examples/HelloTaoQuick3/HelloTaoQuick3.sln | 25 +++++ .../HelloTaoQuick3/HelloTaoQuick3.vcxproj | 100 ++++++++++++++++++ .../HelloTaoQuick3.vcxproj.filters | 41 +++++++ .../HelloTaoQuick3/HelloTaoQuick3/main.cpp | 24 +++++ .../HelloTaoQuick3/HelloTaoQuick3/main.qml | 18 ++++ .../HelloTaoQuick3/HelloTaoQuick3/qml.qrc | 5 + .../HelloTaoQuick3/taoQuick.props | 18 ++++ 7 files changed, 231 insertions(+) create mode 100644 examples/HelloTaoQuick3/HelloTaoQuick3.sln create mode 100644 examples/HelloTaoQuick3/HelloTaoQuick3/HelloTaoQuick3.vcxproj create mode 100644 examples/HelloTaoQuick3/HelloTaoQuick3/HelloTaoQuick3.vcxproj.filters create mode 100644 examples/HelloTaoQuick3/HelloTaoQuick3/main.cpp create mode 100644 examples/HelloTaoQuick3/HelloTaoQuick3/main.qml create mode 100644 examples/HelloTaoQuick3/HelloTaoQuick3/qml.qrc create mode 100644 examples/HelloTaoQuick3/HelloTaoQuick3/taoQuick.props diff --git a/examples/HelloTaoQuick3/HelloTaoQuick3.sln b/examples/HelloTaoQuick3/HelloTaoQuick3.sln new file mode 100644 index 00000000..dd6534bf --- /dev/null +++ b/examples/HelloTaoQuick3/HelloTaoQuick3.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.33627.172 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloTaoQuick3", "HelloTaoQuick3\HelloTaoQuick3.vcxproj", "{4091D318-EF85-4A5B-B4B7-DDF7A92C2269}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4091D318-EF85-4A5B-B4B7-DDF7A92C2269}.Debug|x64.ActiveCfg = Debug|x64 + {4091D318-EF85-4A5B-B4B7-DDF7A92C2269}.Debug|x64.Build.0 = Debug|x64 + {4091D318-EF85-4A5B-B4B7-DDF7A92C2269}.Release|x64.ActiveCfg = Release|x64 + {4091D318-EF85-4A5B-B4B7-DDF7A92C2269}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {3AD2632C-A9D2-4450-8503-26757BD9C66B} + EndGlobalSection +EndGlobal diff --git a/examples/HelloTaoQuick3/HelloTaoQuick3/HelloTaoQuick3.vcxproj b/examples/HelloTaoQuick3/HelloTaoQuick3/HelloTaoQuick3.vcxproj new file mode 100644 index 00000000..47520ca4 --- /dev/null +++ b/examples/HelloTaoQuick3/HelloTaoQuick3/HelloTaoQuick3.vcxproj @@ -0,0 +1,100 @@ + + + + + Debug + x64 + + + Release + x64 + + + + {4091D318-EF85-4A5B-B4B7-DDF7A92C2269} + QtVS_v304 + 10.0.20348.0 + 10.0.20348.0 + $(MSBuildProjectDirectory)\QtMsBuild + + + + Application + v143 + + + Application + v143 + + + + + + + D:\Qt\Online\5.15.2\msvc2019_64 + quick + debug + + + D:\Qt\Online\5.15.2\msvc2019_64 + quick + release + + + + + + + + + + + + + + + + + + + + + + + + true + true + ProgramDatabase + Disabled + MultiThreadedDebugDLL + + + Windows + true + + + + + true + true + None + MaxSpeed + MultiThreadedDLL + + + Windows + false + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/HelloTaoQuick3/HelloTaoQuick3/HelloTaoQuick3.vcxproj.filters b/examples/HelloTaoQuick3/HelloTaoQuick3/HelloTaoQuick3.vcxproj.filters new file mode 100644 index 00000000..50326d4a --- /dev/null +++ b/examples/HelloTaoQuick3/HelloTaoQuick3/HelloTaoQuick3.vcxproj.filters @@ -0,0 +1,41 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + qml;cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {99349809-55BA-4b9d-BF79-8FDBB0286EB3} + ui + + + {639EADAA-A684-42e4-A9AD-28FC9BCB8F7C} + ts + + + + + Source Files + + + Resource Files + + + Source Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/examples/HelloTaoQuick3/HelloTaoQuick3/main.cpp b/examples/HelloTaoQuick3/HelloTaoQuick3/main.cpp new file mode 100644 index 00000000..8833a760 --- /dev/null +++ b/examples/HelloTaoQuick3/HelloTaoQuick3/main.cpp @@ -0,0 +1,24 @@ +#include +#include +#include +int main(int argc, char *argv[]) +{ +#if defined(Q_OS_WIN) + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); +#endif + + QGuiApplication app(argc, argv); + + QQmlApplicationEngine engine; + + QString importPath = TaoQuickImportPath; + importPath = importPath.replace("\\", "/"); + engine.addImportPath(importPath); + engine.rootContext()->setContextProperty("taoQuickImportPath", importPath); + + engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); + if (engine.rootObjects().isEmpty()) + return -1; + + return app.exec(); +} diff --git a/examples/HelloTaoQuick3/HelloTaoQuick3/main.qml b/examples/HelloTaoQuick3/HelloTaoQuick3/main.qml new file mode 100644 index 00000000..62ca216b --- /dev/null +++ b/examples/HelloTaoQuick3/HelloTaoQuick3/main.qml @@ -0,0 +1,18 @@ +import QtQuick 2.9 +import QtQuick.Window 2.2 +import TaoQuick 1.0 +Window { + visible: true + width: 640 + height: 480 + title: qsTr("Hello World") + CusButton_Blue { + width: 120 + height: 36 + anchors.centerIn: parent + text: "Hello" + onClicked: { + console.log("hello TaoQuick") + } + } +} diff --git a/examples/HelloTaoQuick3/HelloTaoQuick3/qml.qrc b/examples/HelloTaoQuick3/HelloTaoQuick3/qml.qrc new file mode 100644 index 00000000..5f6483ac --- /dev/null +++ b/examples/HelloTaoQuick3/HelloTaoQuick3/qml.qrc @@ -0,0 +1,5 @@ + + + main.qml + + diff --git a/examples/HelloTaoQuick3/HelloTaoQuick3/taoQuick.props b/examples/HelloTaoQuick3/HelloTaoQuick3/taoQuick.props new file mode 100644 index 00000000..1e3f7634 --- /dev/null +++ b/examples/HelloTaoQuick3/HelloTaoQuick3/taoQuick.props @@ -0,0 +1,18 @@ + + + + + + + TaoQuickImportPath=R"(file:///$(ProjectDir)..\..\..\src)";%(PreprocessorDefinitions) + + + + + TaoQuickImportPath="qrc:/";%(PreprocessorDefinitions) + + + + + + \ No newline at end of file