linux下安装QT过程

时间:2023-03-08 18:29:02
linux下安装QT过程

说QT是linux下主要的图形开发工具一点都不过分,虽然诺基亚公司放弃Meego、遣散了Qt开发团队,但是它的各种商业、企业版本还是的到了很好的保护,linux下的开发工具集里还是经常看到它的身影,毕竟、linux下不仅图形开发工具少,而且成熟的、稳定的库更加少。下面来讲讲linux下QT的安装过程。

一、准备安装文件:

1)、 到网址:http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-4.8.4.tar.gz下载QT的安装版本,放到linux下的任意目录;

二、配置安装:

1)、利用解压命令tar进行解压:tar zxvf qt-everywhere-opensource-src-4.8..tar.gz

2)、 进入解压后文件目录,执行配置:

cd qt-everywhere-opensource-src-4.8./

./configure     这里也可以利用./configure -prefix /opt/qt-4.8.4-x11 ,指定配置的目录,如果目录不存在会自动创建。

配置过程中会有以下提示:

Which edition of Qt do you want to use ?

Type 'c' if you want to use the Commercial Edition.

Type 'o' if you want to use the Open Source Edition.

选择 'o' 选项,继续配置.。。。。。。。

This is the  Open Source Edition.

You are licensed to use this software under the terms of
the Lesser GNU General Public License (LGPL) versions 2.1.
You are also licensed to use this software under the terms of
the GNU General Public License (GPL) versions 3. Type '3' to view the GNU General Public License version 3.
Type 'L' to view the Lesser GNU General Public License version 2.1.
Type 'yes' to accept this license offer.
Type 'no' to decline this license offer. Do you accept the terms of either license?

输入yes,回车继续。

接下来会生成makefile文件,配置完毕后执行make。之后会进行大概三个小时的配置。。。慢慢等吧。

三、执行安装:

执行sudo make install来安装,会安装到/usr/local/Trolltech/Qt-4.8.4目录下。安装时间比较短,大概需要几分钟左右,至此,安装完成。

运行 /usr/local/Trolltech/Qt-4.8.4/bin/designer ,看见 qt 启动,如下图所示,就说明QT已经安装成功。

linux下安装QT过程