Ubuntu下安装Qt

方法一:
sudo apt-get install qt4-dev-tools
sudo apt-get install qtcreator

 

方法二:

下载http://get.qt.nokia.com/qtsdk/qt-sdk-linux-x86-opensource-2010.01.bin

chmod u+x qt-sdk-linux-x86-opensource-2010.01.bin

./qt-sdk-linux-x86-opensource-2010.01.bin

按步骤安装即可,

我这里安装到/usr/qtsdk-2010.01目录下,

然后,gedit ~/bashrc

在最后一行处加上

PATH=$PATH:/usr/qtsdk-2010.01/qt/bin

export PATH

即可。

这里既安装了qtsdk,又安装了qtcreator。

 

1、运行qtcreator可能会显示No valid Qt version set. Set one in Tools/Options之类的信息

“安装完毕之后,新建一个工程,发现如题所示的error,version有问题。在网上查了下,很多人都有碰到,但是都没有写明如何解决,其实,解决方法在Qt Creator的帮助文件里就有提到了:
TermMeaning
Auto-detected QtThe version of Qt installed on your system. This is the Qt version for theqmake command found in your PATH.
Default QtThe version of Qt configured in Tools -> Options -> Qt 4 -> Default Qt Version. This is the Qt version used by your new projects. It defaults to Auto-detected Qt.
Project QtThe version of Qt configured in Build&Run -> Build Settings -> Build Configurations. This is the Qt version that is actually used by a particular project. It defaults to Default Qt.
Shadow BuildShadow building means building a project in a separate directory, the build directory. The build directory is different from the source directory. One of the benefits of shadow building is that it keeps your source directory clean. Shadow building is the best practice if you need many build configurations for a single set of source.

2、也有可能遇上这样的错误信息:make : g++: 命令未找到

出现错误是因为没有安装g++编译器,运行以下命令来安装:
sudo apt-get install g++
应该就好了,如果还没好,再安装这个:
sudo apt-get install pentium-builder

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值