构建后更改Qt安装路径? [英] Change Qt install path after building?

查看:49
本文介绍了构建后更改Qt安装路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在构建后更改 Qt 安装路径?

how can I change Qt install path after I building it ?

示例:qmake.exe 搜索二进制文件到原始安装路径,我该如何更改/重新定义它?

Example : qmake.exe search binaries to original install path, how can I change/redefine it ?

谢谢.

我终于找到了适用于 Qt 的补丁:

Edit : I finally found this patch to apply to Qt :

推荐答案

我正在研究这个问题,并通过使用 qt.conf 文件自定义 qt 找到了一种有效的方法(在 qt 4.7.2 中).

I was looking into this and found a way that works (in qt 4.7.2) by customizing qt with a qt.conf file.

就我而言,我添加了一个 qt4-4.7.2/bin/qt.conf(我认为它必须与 qmake 可执行文件在同一位置)

In my case, I added a qt4-4.7.2/bin/qt.conf (I think it must be in the same place as the qmake executable)

内容如下:

[Paths]
Prefix = c:/my_path/to/qt4-4.7.2

并且 qmake -query 开始返回正确的路径!

and the qmake -query started returning the proper paths!

参见:http://qt-project.org/doc/qt-5.0/qtdoc/qt-conf.html 了解更多详情

这篇关于构建后更改Qt安装路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆