`
v5qqbrowser
  • 浏览: 356864 次
文章分类
社区版块
存档分类
最新评论

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的帮助文件里就有提到了:
Term Meaning
Auto-detected Qt The version of Qt installed on your system. This is the Qt version for theqmake command found in your PATH.
Default Qt The 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 Qt The 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 Build Shadow 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

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics