QT_HOST_PATH

进行交叉编译时,主机上 Qt 安装的位置。

该变量自 Qt 6.0 起引入。

进行交叉编译时,必须将此变量设置为主机平台的 Qt 安装路径。该变量用于定位将在主机上运行的工具(如moc、rcc、androiddeployqt 等)。 在为主机系统编译 Qt 时,也可以重用预安装的工具:通过将 `QT_HOST_PATH ` 指向预安装的主机 Qt,并将 `QT_FORCE_FIND_TOOLS ` 设置为 `ON`。此时,Qt 版本应保持一致。

© 2026 The Qt Company Ltd. 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.