qtchooser

同时安装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则再该回来。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值