Although many people use RedHat or fedora as the host computer operating system on the network, I think Ubuntu is the most convenient, because most of the required software packages can be installed through apt-Get, instead of compiling the source code. It is not easy to compile the source code by yourself, because unexpected and inexplicable errors often occur during the compilation process.
The operating system we use is Ubuntu 8.04. Using the latest version of QT 4.4.0 is simple to install. Just run the following command:
Sudo apt-Get install qt4-dev-tools qt4-doc qt4-qtconfig qt4-demos
Note that in this version of the software package, the qt4-dev-tools contains the QT
And QT linguist. Therefore, you do not need to install these two tools separately. Other, qt4-doc
Is a help document that contains detailed descriptions of various class libraries in QT and a wide range of example programs. You can use the QT assistant tool to open and read. Qt4-qtconfig
It is a dialog box for configuring the QT environment. It is generally the default setting and is rarely necessary to change it. The qt4-demos contains many executable files and source code that can run. A qt4-designer is a designer used to design a GUI.
To connect to the MySQL database, install the MySQL DRIVER:
Sudo apt-Get install libqt4-sql-mysql
It is much easier to install and configure the QT MySQL driver in windows. If you need other QT libraries that are not installed by default, you can enter sudo apt-Get install libqt4 in the command line and press the tab key to automatically complete the installation, all software packages starting with libqt4-are listed, as shown in:
You can use a command to complete these operations without compiling the source code. It is a practical tips to use the tab key to list all optional software packages without knowing the name.
In my project, I also need to draw some data curves and statistical charts, which are provided by a third-party qwt library. Similarly, you only need one command to complete the installation:
Sudo apt-Get install libqwt5-qt4 libqwt5-qt4-dev
Open QT designer and you will find that the "qwt widgets" group is added to the left widget list.
Finally, I think qdevelop is very good about the integrated development environment. It works well with QT designer and has the function of prompting class member functions. Run the following command to install:
Sudo apt-Get install qdevelop
In this way, you can use qdevelop to write code, compile and debug, and use QT designer to design the interface, which is highly efficient in development.