将编写好的Qt程序构件套件选为“ Desktop Qt 5.14.2 MinGW 64-bit Debug”,然后按Ctrl+R运行。
在新建Qt程序的路径(这个例子中新建程序的路径是C:\Users\Maker\Documents\Qt Creator)下可以看到有一个文件夹“build-autoPing-Desktop_Qt_5_14_2_MinGW_64_bit-Debug”,
双击进入Debug文件夹,在这个文件夹中新建一个叫autoPingPack的文件夹并把autoPing.exe复制到该文件夹里面:
在所有应用中打开Qt 5.14.2(MinGW 7.3.0 64-bit):
输入cd再输入一个空格,然后将autoPingPack的路径C:\Users\Maker\Documents\Qt Creator\build-autoPing-Desktop_Qt_5_14_2_MinGW_64_bit-Debug\debug\autoPingPack粘贴上去按回车:
在第二行命令中输入windeployqt autoPing.exe,再按回车:
接下来就将autoPing.exe在本地电脑上的所有配置文件打包到C:\Users\Maker\Documents\Qt Creator\build-autoPing-Desktop_Qt_5_14_2_MinGW_64_bit-Debug\debug\autoPingPack这个文件夹里:
将autoPingPack这个文件夹复制到现场电脑上即可运行autoPing.exe程序。