Ubuntu Installation QT Development environment

Source: Internet
Author: User
Tags qt designer

Although many people on the network use Redhat or Fedora as the host computer operating system, I think it is most convenient to use Ubuntu, because most of the required software packages can be installed by Apt-get, without starting from the source code to compile themselves. You know, compiling your own source code is not easy, because there are often unexpected and inexplicable errors in the compilation process.



The operating system we use is Ubuntu 8.04, using the current version of Qt 4.4.0, which is simple to install, as long as you run the following command:


sudo apt-get install qt4-dev-tools qt4-doc qt4-qtconfig Qt4-demos




Note that in this version of the package, the Qt4-dev-tools contains tools such as QT Assistant and Qt linguist, so there is no need to install the two tools separately. Other, Qt4-doc is a Help document that contains detailed descriptions of each class library in Qt and a rich example program that can be used to open reading using the QT Assistant tool. Qt4-qtconfig is a dialog box that configures the QT environment, which is generally done by default and rarely necessary to change. Qt4-demos contains many executable files that can be run and source code. Qt4-designer is a designer used to design GUI interfaces.


To connect to the MySQL database, you need to install a driver that connects to MySQL:



sudo apt-get install Libqt4-sql-mysql


It's much easier than the MySQL driver that installs and configures QT under Windows. If you need additional QT libraries that do not have a default installation, you can enter sudo apt-get install libqt4-at the command line and press the TAB key to automatically fill out all the packages that start with libqt4-, as shown in the following illustration:



All of these can be done with a single command, without having to start compiling from the source. Using the TAB key to list all of the optional packages is a useful little trick when you don't remember or know your name.


In my project, you need to draw some data curves and statistical charts, and so on, and third party QWT libraries provide these features. Again, you need only one command to complete the installation:


sudo apt-get install Libqwt5-qt4 Libqwt5-qt4-dev


When you turn on QT Designer, you'll find that the widget list on the left has a "QWT widget" set.


Finally, about the integrated development environment I think qdevelop is very good, it and QT Designer Union is very good, and has the function of prompt class member function. Run the following command to install:


sudo apt-get install Qdevelop


In this way, using Qdevelop to write code and compile, debug, using QT Designer design interface, the development of high efficiency

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.