自定义构建流程

要配置项目的构建、部署和运行方式,请转至首选项>Build & Run >General

构建和运行首选项中的常规选项卡

默认情况下,选择Always deploy project before running it (1) 和Build the Whole Project (2)。因此,当您选择运行 (Run) 时,Qt Creator 会检查项目文件中的更改,并在必要时构建和部署项目。

要在不构建应用程序的情况下部署应用程序,或只构建要运行的应用程序,请在Build before deploying 中选择适当的选项。

在构建前停止应用程序

默认情况下,重建项目前会停止项目包含的应用程序。

要只停止当前应用程序、同一构建目录中的应用程序、所有应用程序或不停止任何应用程序,请在Stop applications before building 中选择相应选项。

使用 jom

在 Windows 上,可以使用jom 代替nmake 来构建项目,以便将编译过程分配给多个 CPU 内核。

要使用jom

  1. Qt Downloads 下载 jom
  2. 选择Use jom instead of nmake

如果编译失败,请清除复选框。

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.