ソースを参照

add images for qt docs

ruki 6 年 前
コミット
c8b9e5d113

BIN
assets/img/guide/qt_quickapp.png


BIN
assets/img/guide/qt_widgetapp.png


+ 29 - 0
guide/project_examples.md

@@ -126,6 +126,31 @@ target("qt_quickapp")
 !> If you are using your own compiled static version of the QT SDK, you need to switch to the `add_rules("qt.quickapp_static")` static rule, 
 because the linked libraries are different and need to be statically linked.
 
+Next, we try to compile, usually, if you use the Qt installation package to install by default, and do not modify the installation path, then in most cases you can automatically detect the root path of the QT SDK, for example:
+
+```bash
+$ xmake
+checking for the architecture ... x86_64
+checking for the Xcode directory ... /Applications/Xcode.app
+checking for the SDK version of Xcode ... 10.15
+checking for the Qt SDK directory ... /Users/ruki/Qt5.13.2/5.13.2/clang_64
+checking for the Qt SDK version ... 5.13.2
+[0%]: ccache compiling.release src/main.cpp
+[49%]: compiling.qt.qrc src/qml.qrc
+[100%]: linking.release test
+Build ok!
+```
+
+Then we continue to run it:
+
+```bash
+$ xmake run
+```
+
+The effect is as follows:
+
+![](/assets/img/guide/qt_quickapp.png)
+
 ### Widgets Application
 
 v2.2.9 or higher:
@@ -152,6 +177,10 @@ target("qt_widgetapp")
 !> If you are using your own compiled static version of the QT SDK, you need to switch to the `add_rules("qt.widgetapp_static")` static rule, 
 because the linked libraries are different and need to be statically linked.
 
+The effect is as follows:
+
+![](/assets/img/guide/qt_widgetapp.png)
+
 ### Android Application
 
 After the 2.2.6 version, you can directly switch to the android platform to compile the Quick/Widgets application, generate the apk package, and install it to the device via the `xmake install` command.

+ 30 - 0
zh-cn/guide/project_examples.md

@@ -127,6 +127,31 @@ target("qt_quickapp")
 
 !> 如果使用的自己编译的static版本QT SDK,那么需要切换到`add_rules("qt.quickapp_static")`静态规则才行,因为链接的库是不同的,需要做静态链接。
 
+接下来,我们尝试编译下,通常,如果是使用Qt的安装包默认安装,也没有修改安装路径,那么大部分情况下都是可以自动检测到QT SDK的根路径,例如:
+
+```bash
+$ xmake
+checking for the architecture ... x86_64
+checking for the Xcode directory ... /Applications/Xcode.app
+checking for the SDK version of Xcode ... 10.15
+checking for the Qt SDK directory ... /Users/ruki/Qt5.13.2/5.13.2/clang_64
+checking for the Qt SDK version ... 5.13.2
+[  0%]: ccache compiling.release src/main.cpp
+[ 49%]: compiling.qt.qrc src/qml.qrc
+[100%]: linking.release test
+build ok!
+```
+
+然后我们继续运行下它:
+
+```bash
+$ xmake run
+```
+
+效果如下:
+
+![](/assets/img/guide/qt_quickapp.png)
+
 ### Widgets应用程序
 
 v2.2.9以上版本:
@@ -152,6 +177,11 @@ target("qt_widgetapp")
 
 !> 如果使用的自己编译的static版本QT SDK,那么需要切换到`add_rules("qt.widgetapp_static")`静态规则才行,因为链接的库是不同的,需要做静态链接。
 
+
+运行效果如下:
+
+![](/assets/img/guide/qt_widgetapp.png)
+
 ### Android应用程序
 
 2.2.6之后版本,可以直接切到android平台编译Quick/Widgets应用程序,生成apk包,并且可通过`xmake install`命令安装到设备。