Practice: Build the QT development environment and sample programs on Tiny6410

Source: Internet
Author: User
Virtual Machine: VMware7 + Fedora9 Development Board: Tiny6410qt version: release of supervisor. The released directory can be any directory such as/home/stephen

Virtual Machine: VMware7 + Fedora 9
Development Board: Tiny6410
Qt version: qte4.7.0

1) obtain the source code of QTE4.7 on the VM and release and compile it.
Step 1: Obtain and translate the source code
Release qt-everywhere-opensource-src-4.7.0.tar.gz on a virtual machine.
The released directory can be any

Step 2: Compile
Operate on a virtual machine

Configure parameters first:
Echo yes |. /configure -- prefix/opt/Qt4.7-opensource-embedded arm-xplatform qws/linux-arm-g ++-no-webkit-qt-libtiff-qt-libmng-qt-mouse -tslib-qt-mouse-linuxtp-no-neon

Then make & make install
Note that the -- prefix is/opt/Qt4.7 and is installed in this directory.

2) Deploy Qt4.7 on the ARM board, that is, tiny6410.
Pack Qt4.7 on the Virtual Machine
# Cd/opt
# Tar cvzf qt4.7.tgz Qt4.7
Decompress the/opt directory on tiny6410 in the SD card or nfs mode.
# Cd/opt
# Tar xvzf/sdcard/qt4.7.tgz

3) install and configure QT Creator in the Virtual Machine and compile the example
Install qt creator in the Virtual Machine. Note that the latest package is downloaded from the nokia official website. The current installation method is to download a 20 mb package, and then run chmod + x, it automatically downloads and installs all content online. The installation effect is almost the same as that on windows.
After installation, write a simple program. Create a new qt gui application. The initial compilation is to generate the local code, that is, the Code on fedora9. The interface is like this. Just put a simple textbox and button

Install the arm cross compiler and specify the qmake of the arm.
# Tar xvzf target-qte-4.7.0.tgz-C/

Set parameters:
Step 1,
Tools-> Options-> Qt4-> Qt Versions
Add a qmake location for/usr/local/Trolltech/QtEmbedded-4.7.0-arm/bin/qmake
Step 2: Select Qt embbed 7.0 in the left-side toolbar Projects-> Build Settings. Click the hammer to generate
Helloqt4: This is our arm executable file. If you are not at ease, you can use file helloqt4 to view the arm words.

Next, copy helloqt4 to the directory of the ARM Board, for example,/opt/Qt4.7/demos/embedded.

4) change the QT configuration file on the ARM board.
The next step is to change the Startup file/etc/init. d/rcS and/bin/qt4.
Add:
Echo "now executing/bin/qt4 file">/dev/tty1
/Bin/qt4
Indicates executing the qt4 file script, which contains both the environment variable settings of qt4 and the Cross-compiled file helloqt4 to be executed.
Add the following content at the end of qt4:
Cd/opt/Qt4.7/demos/embedded
./Helloqt4-qws
Other-qws parameters are important.

Note: comment out the rows of scripts that originally called qtopia to avoid conflicts with this qte4.7.

5) run the reboot command on the ARM board correctly.
The dialog box helloqt4 is displayed. After closing by the number X, the qt interface is exited.
In this case, the character status appears on the interface and the serial port terminal is activated. You can press enter to perform other operations on the command status. Of course, such steps cannot appear on official products. Therefore, it is better to check whether the disabled symbol is not allowed on the user interface.


This article from the CSDN blog, reproduced please indicate the source: http://blog.csdn.net/stephenzhu/archive/2011/05/24/6442359.aspx

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.