Install Qt in Ubuntu

Source: Internet
Author: User

You can install Qt in Ubuntu 11.04 in two ways. One is to directly install the qt sdk package, which inherits the QT designer and QT library files. Another method is to download the source code package of QT and then compile and install it.

Method 1

Http://qt.nokia.com/downloads to download the corresponding version, such as linux32-bit.

Method 2

Download the source package, such as the latest http://qt.nokia.com/downloads/linux-x11-cpp

An error occurs during compilation. The solution is to install three packages sudo apt-Get install libX11-dev libxext-dev libxtst-Dev

1) configuration: Enter the decompressed folder and run./configure-Prefix/usr/local/trolltech/Qt-4.7.4-pc
2) Compile: Make (long time, several hours)
3) installation: make install (because the installation directory is specified during configuration, it will be installed under the Directory:/usr/local/trolltech/Qt-4.7.3-pc)
4) then set the QT path, which can be added to home/user/. profile.

Qtdir =/usr/local/trolltech/Qt-4.7.4
Path = $ qtdir/bin: $ path
Manpath = $ qtdir/MAN: $ manpath
LD_LIBRARY_PATH = $ qtdir/lib: $ LD_LIBRARY_PATH

Export qtdir path manpath LD_LIBRARY_PATH

Install others:

Sudo apt-Get install qt4-dev-tools # Development Kit

Sudo apt-Get install qtcreator # ide

Sudo apt-Get install qt4-doc # development help documentation

Sudo apt-Get install qt4-qtconfig # Configuration Tool

Sudo apt-Get install qt4-demos # demo source code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.