1
0
mirror of https://github.com/jaredtao/TaoQuick.git synced 2025-01-17 20:12:54 +08:00

路径简化

This commit is contained in:
jared 2021-07-30 10:17:09 +08:00
parent c3032b2ec0
commit 435b3acaeb
164 changed files with 33 additions and 40 deletions

View File

@ -173,9 +173,9 @@ void TaoFrameLessView::setIsMax(bool isMax)
void TaoFrameLessView::resizeEvent(QResizeEvent *e)
{
SetWindowRgn(HWND(winId()),
CreateRoundRectRgn(0, 0, width(), height(), 4, 4),
true);
// SetWindowRgn(HWND(winId()),
// CreateRoundRectRgn(0, 0, width(), height(), 4, 4),
// true);
Super::resizeEvent(e);
}

View File

@ -222,7 +222,7 @@ https://marketplace.qt.io/collections/newest/products/taoquick
核心库目录为
src/TaoQuick/imports/TaoQuick/Qml
src/TaoQuick/Qml
核心库结构如下
@ -255,8 +255,6 @@ CusConfig是核心库的全局配置,主要包括字体、颜色等,所有组件
# 使用核心库TaoQuick
详细的使用方法,可以阅读 [入门指南](入门指南.md)
## qmake用法
@ -279,25 +277,27 @@ TaoQuick组件将以本地文件或qrc资源的方式被引用。
具体使用步骤:
1. 将src/TaoQuick文件夹拷贝到你的项目中,任意位置
1. 将src文件夹拷贝到你的项目中任意位置
2. 在你的项目pro文件中,导入对应的TaoQuick文件夹中的pri文件即可
2. 在你的项目pro文件中,导入对应的src文件夹中的pri文件即可
```qmake
include(TaoQuick/TaoQuick.pri)
include(src/TaoQuick.pri)
```
或者
说明此pri文件定义两个宏TaoQuickImportPath 和 TaoQuickImagePath。
```qmake
include(src/TaoQuick/imports/imports.pri)
debug模式都以本地文件的方式使用release模型则以qrc资源文件的方式使用。
另外, 这几个变量用来支持QtCreator的语法高亮
```
QML_IMPORT_PATH = $$PWD
QML2_IMPORT_PATH = $$PWD
QML_DESIGNER_IMPORT_PATH = $$PWD
```
(如果你的语法高亮有问题,但是程序能运行,可以先不管它。
都可以,只要路径对应到实际的文件即可
(说明此pri文件会定义两个宏TaoQuickImportPath 和 TaoQuickImagePath。
debug模式都以本地文件的方式使用release模型则以qrc资源文件的方式使用)
毕竟QtCreator的bug也不是一天两天了
3. 在CPP代码中增加导入路径。
@ -328,20 +328,22 @@ TaoQuick 0.5.0以后的版本增加了cmake支持。
用法如下:
1. 将src/TaoQuick文件夹拷贝到你的项目中,任意位置
1. 将src文件夹拷贝到你的项目中任意位置
2. 将cmake/TaoQuick.cmake文件拷贝到你的项目中任意位置并且
确保TaoQuick.cmake文件中第一行的TaoQuickPath指向正确的TaoQuick路径
确保TaoQuick.cmake文件中第一行的TaoQuickPath指向正确的src路径
3. 在你的项目CMakeLists.txt文件中,导入对应的TaoQuick.cmake
3. 导入TaoQuick
需要先增加cmake扩展路径
在你的项目CMakeLists.txt文件中, 增加cmake扩展路径
```cmake
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
```
加载好扩展路径就可以用incude指令导入taoQuick.cmake了
我这里的扩展路径是仓库根目录下的cmake文件夹其中包含了一些后缀名为 .cmake的文件。
加载好扩展路径用incude指令导入TaoQuick.cmake即可
```cmake
include(taoQuick)
@ -391,8 +393,6 @@ endif()
欢迎联系我,乐于提供技术咨询服务,可洽谈技术支持、商业合作。
微信: xsd2410421
QQ: 759378563
邮箱: jared2020@163.com

View File

@ -196,7 +196,7 @@ echo content as table
Core Library source code path:
src/TaoQuick/imports/TaoQuick/Qml
src/TaoQuick/Qml
Content:
@ -233,7 +233,6 @@ Other Contents reference to above table
```shell
git clone https://githun.com/jaredtao/TaoQuick.git
cd TaoQuick
git submodule update --init
```
## qmake
@ -254,21 +253,16 @@ Compared with 'Qml module' and 'Qml C++ plugin', this usage has the following ad
detail use step
1. copy src/TaoQuick to your project, in any location
1. copy src to your project, in any location
2. Import 'pri' files in the corresponding TaoQuick folder in your project 'pro' file
2. Import 'TaoQuick.pri' files in the corresponding src folder in your project 'pro' file
for eaxmple:
```qmake
include(TaoQuick/TaoQuick.pri)
include(src/TaoQuick.pri)
```
or
```qmake
include(src/TaoQuick/imports/imports.pri)
```
TaoQuick.pri will define two MACRO: TaoQuickImportPath and TaoQuickImagePath.
@ -300,7 +294,7 @@ TaoQuick start support cmake after version 0.5.0 , it's same as qmake.
detail use step
1. copy src/TaoQuick to your project, in any location
1. copy src folder to your project, in any location
2. copy cmake/taoQuick.cmake to your project, in any location

View File

@ -1,4 +1,4 @@
set(TaoQuickPath ${CMAKE_SOURCE_DIR}/src/TaoQuick/imports)
set(TaoQuickPath ${CMAKE_SOURCE_DIR}/src)
if (CMAKE_BUILD_TYPE MATCHES "Release")
set(TaoQuickRes ${TaoQuickPath}/TaoQuick/TaoQuick.qrc CACHE STRING "tao quick res path")

View File

@ -6,5 +6,5 @@ SOURCES += main.cpp
RESOURCES += Res.qrc
include(../../src/TaoQuick/TaoQuick.pri)
include(../../src/TaoQuick.pri)

View File

@ -27,7 +27,7 @@ CONFIG(debug,debug|release) {
# error("3rdparty library TaoCommon missing, please update by command: git submodule update --init")
#}
include($${TaoQuick_3RDPARTY_TREE}/TaoCommon/src/TaoCommon/TaoCommon.pri)
include($${TaoQuick_SOURCE_TREE}/src/TaoQuick/imports/imports.pri)
include($${TaoQuick_SOURCE_TREE}/src/TaoQuick.pri)
include(TaoQuickShow.pri)
DEFINES += QMAKE_GEN_TAOMACRO
!build_pass {

View File

@ -27,3 +27,4 @@ QML2_IMPORT_PATH = $$PWD
# Additional import path used to resolve QML modules just for Qt Quick Designer
QML_DESIGNER_IMPORT_PATH = $$PWD

View File

Before

Width:  |  Height:  |  Size: 232 B

After

Width:  |  Height:  |  Size: 232 B

View File

Before

Width:  |  Height:  |  Size: 262 B

After

Width:  |  Height:  |  Size: 262 B

View File

Before

Width:  |  Height:  |  Size: 197 B

After

Width:  |  Height:  |  Size: 197 B

View File

Before

Width:  |  Height:  |  Size: 164 B

After

Width:  |  Height:  |  Size: 164 B

View File

Before

Width:  |  Height:  |  Size: 164 B

After

Width:  |  Height:  |  Size: 164 B

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 215 B

After

Width:  |  Height:  |  Size: 215 B

View File

Before

Width:  |  Height:  |  Size: 314 B

After

Width:  |  Height:  |  Size: 314 B

View File

Before

Width:  |  Height:  |  Size: 266 B

After

Width:  |  Height:  |  Size: 266 B

View File

Before

Width:  |  Height:  |  Size: 374 B

After

Width:  |  Height:  |  Size: 374 B

View File

Before

Width:  |  Height:  |  Size: 262 B

After

Width:  |  Height:  |  Size: 262 B

View File

Before

Width:  |  Height:  |  Size: 503 B

After

Width:  |  Height:  |  Size: 503 B

View File

Before

Width:  |  Height:  |  Size: 440 B

After

Width:  |  Height:  |  Size: 440 B

View File

Before

Width:  |  Height:  |  Size: 426 B

After

Width:  |  Height:  |  Size: 426 B

View File

Before

Width:  |  Height:  |  Size: 557 B

After

Width:  |  Height:  |  Size: 557 B

View File

Before

Width:  |  Height:  |  Size: 175 B

After

Width:  |  Height:  |  Size: 175 B

View File

Before

Width:  |  Height:  |  Size: 377 B

After

Width:  |  Height:  |  Size: 377 B

View File

Before

Width:  |  Height:  |  Size: 236 B

After

Width:  |  Height:  |  Size: 236 B

View File

Before

Width:  |  Height:  |  Size: 367 B

After

Width:  |  Height:  |  Size: 367 B

View File

Before

Width:  |  Height:  |  Size: 218 B

After

Width:  |  Height:  |  Size: 218 B

View File

Before

Width:  |  Height:  |  Size: 796 B

After

Width:  |  Height:  |  Size: 796 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Some files were not shown because too many files have changed in this diff Show More