加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

qtchooser

(2015-11-30 22:50:17)
同时安装qt4,qt5后发现默认是qt5,qt4项目不能编译。通过which qmake,知道qmake 命令在/usr/bin/qmake,这个文件链接到/user/bin/qchooser 
猜想这个chooser是个进行版本管理的工具,。。 
其用法如下: 
Usage: 
  qtchooser { -l | -list-versions | -print-env } 
  qtchooser -run-tool= [-qt=] [program arguments] 
  [-qt=] [program arguments] 

Environment variables accepted: 
QTCHOOSER_RUNTOOL  name of the tool to be run (same as the -run-tool argument) 
QT_SELECT          version of Qt to be run (same as the -qt argument) 


cd  /usr/lib/x86_64-linux-gnu/qtchooser/ 
r$ ll
总用量 72
drwxr-xr-x  2 root root  4096 11月 30 22:12 ./
drwxr-xr-x 96 root root 69632 11月 30 22:13 ../
lrwxrwxrwx  1 root root    50 11月 27 20:58 4.conf -> ../../../share/qtchooser/qt4-x86_64-linux-gnu.conf
lrwxrwxrwx  1 root root    50 11月 27 20:58 5.conf -> ../../../share/qtchooser/qt5-x86_64-linux-gnu.conf
lrwxrwxrwx  1 root root    50  5月 28  2015 default.conf -> ../../../share/qtchooser/qt5-x86_64-linux-gnu.conf
lrwxrwxrwx  1 root root    50 11月 27 20:58 qt4.conf -> ../../../share/qtchooser/qt4-x86_64-linux-gnu.conf
lrwxrwxrwx  1 root root    50 11月 27 20:58 qt5.conf -> ../../../share/qtchooser/qt5-x86_64-linux-gnu.conf

通过下面两条命令就可以把默认qt切换到qt4
 sudo remove default.conf
sudo ln -s /usr/share/qtchooser/qt4-x86_64-linux-gnu.conf default.conf 

或将default.conf中
/usr/lib/x86_64-linux-gnu/qt5/bin
改为
/usr/lib/x86_64-linux-gnu/qt4/bin
若要改回qt5则再该回来。

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有