Download and install QT/e-related software
1. Install QT/e.
Installed on the local machine, including qt4.0.1 (Windows version) and QT/E2. 3. 7 (Linux version ).
QT/e I installed in my virtual machine. Due to QT/e2.3.7 versions, it is suitable for redhat9. Version 0 (or earlier). Otherwise, the installation fails.
The Installation Process of QT/E is complex. For details, refer to the following section.Article. QT/Embedded Development Environment establishment process
This article can be found online.
The installation path for QT/E in the Virtual Machine under the Local Machine is/home/wangxl/QTE/qt-2.3.7
QT/X11 installation path:/home/wangxl/QTE/qt-2.3.2
Tmake installation path:/home/wangxl/QTE/Tmake-1.8
QT/E is: ftp://ftp.rediris.es/mirror/Qt/source/
Tmake is: ftp://ftp.trolltech.com/freebies/tmake/
Ii. Differences between QT, QT/E, and qt3 and qt4
The syntax of QT is the same as that of QT/e. the difference lies in the size of the Library Class or the size of the Library Class function. Compared with QT, QT/e does not support a few classes or functions. Whether or not QT/E contains a class or a function in a class. My method is to find it in the include folder under the QT/e installation directory.
There are many differences between qt3 and qt4. The main difference is that the Library Class and supported functions are changed. For example, some functions in qt3 are replaced by other function names in qt4. Therefore, many qt4ProgramIt cannot be executed in the qt3 environment. QT/e2.3.7 is basically the same as qt3, except for the differences between QT and QT/e I mentioned earlier.
3. QT/e compilation and execution.
1. Before compiling and executing QT/e, set the tmake and QT/e lib environments as follows:
[Root @ localhost tmake-1.8] # export tmakedir = $ pwd
[Root @ localhost tmake-1.8] # export tmakepath = $ tmakedir/lib/qws/linux-x86-g ++
[Root @ localhost tmake-1.8] # export Path = $ tmakedir/bin: $ path
[Root @ localhost qt-2.3.7] # export qtdir = $ pwd
[Root @ localhost qt-2.3.7] # export qtedir = $ qtdir
[Root @ localhost qt-2.3.7] # export Path = $ qtdir/bin: $ path
[Root @ localhost qt-2.3.7] # export LD_LIBRARY_PATH = $ qtdir/lib: $ LD_LIBRARY_PATH
2. If you use the UI designed by the designer tool (described later), convert the *. UI file to *. h file and *. cpp file. The conversion method is as follows:
UIC-O test. h test. UI
UIC-O test. cpp-I test. h test. UI
3. Compile a *. Pro file (used to generate the MAKEFILE file). The file format is relatively fixed.
For example, the basic format of the test. Pro file is as follows (test. cpp, test. h main. cpp is used as an example ):
Emplate = app
Config + = QT warn_on release
Headers = test. h
Sources = test. CPP/
Main. cpp
Target = Hello
Dependpath =/home/wangxl/QTE/qt-2.3.7/include
Requires =
4. Generate the MAKEFILE file
Method: tmake-O makefile test. Pro
5. compile and generate executable files
Make
6 open qvfb
Go to the directory where QT/X11 is installed and run qvfb in the bin directory.
Sometimes you need to modify the deptb parameter during qvfb execution to execute the QT/e program. You can directly select the configure color option in the qvfb window, or run the following command to execute qvfb.
./Qvfb-width **-height **-depth **
7. Run the QT/e program
For example. /Test
In the qvfb program window, the test program is displayed.
Iv. QT/E and QT/X11
To install QT/e, you also need to install QT/X11 and tmake. tmake is used to generate makefile files. The installation of QT/X11 mainly provides the designer tool and qvfb tool to QT/e.
Designer can be used to design a graphical interface, and finally generate a. UI file. You can use UIC commands to convert it to the corresponding C ++ file.
Qvfb simulates frame buffering and provides a display platform for QT/e programs.
5. Execute the QT/e program on the arm Board
QT/e programs that can be executed on my virtual machine cannot be executed on the arm board. You need to re-compile QT/E and set the compiling environment for the arm board system, for details, refer to my other article QT/e development record.
6. QT/e support Chinese display problems
QT/e must be converted to display Chinese characters. For details, refer to my other article QT/e development record.
However, due to the lack of Unicode qpf file fonts, the problem of uneven text size remains unresolved.
seven QT/e references:
http://www.qtcn.org/bbs/index.php QT Chinese Forum
http://www.qiliang.net/qt/ (for qt3 classes, and class functions can be found here)
provides the electronic version C ++ GUI programming with QT 3 (local) of the best qt3 programming book.
for details about qt4, see qt nat (local ), in addition, you can also find qt3 classes and libraries in QT Nat.