What is the Qt?
Qt is a cross-platform application development framework, widely used for the development of GUI programs (in which case it is known as a Widget toolkit).
Qt is used for developing non-GUI programs such as console tools and servers.
2
Varieties
Qt/X11 — Qt for X Window System (Unix / Linux) Qt/Mac — Qt for Apple Mac OS X .Qt/Windows — Qt for Microsoft WindowsQt/Embedded — Qt for embedded platforms
(PDA, etc ...)Qt Jambi — Qt for Java
3
What is the Qt?
Qt: GUI libraryBased on X-window
Qt/EmbeddedBased on Frame Buffer which is resource of kernel
Frame BufferVirtual buffer for graphic hardwareSome graphic cards have physical hardware for
frame bufferSome graphic cards have application for frame
buffer
4
What is the Qt?
5
The characteristic of Qt/Embedded
650KB ~ 5MB according to options.providing various platforms.providing an environment that is compatible with the
source level of Qt/X11, Qt/Windows, and Qt/MAC.it is possible that applications are concurrently
executed.direct video frame buffer access.providing TrueType and BDF(Bitmap Distribution
Format)providing multi-language, UNICODE, and
globalizationopen source.
Qt/Embedded vs Qt/X11
6
Qt/Embedded Install Download SDK Port host environment to use Qt library Porting SDK
Configure SDK source files embedded hardware environmentCompile SDKConfirm porting
Configure target kernel compile configuration Install tmake
Download SDK Configure host environment to use tmake Confirm porting
Configure target board environment to use Qt library
7
Download SDK
Homepage of Trolltechhttp://www.trolltech.com
FTP server of Trolltechftp://ftp.trolltech.com/qt/source/qt-embedded-2.3.2.tar.gz
qt-embedded-2.3.2.tar.gzDownload and copy to the directory, “/Qt/”
8
Porting SDKRelease compression
Edit the file “/root/.bashrc”
Refresh the path
9
# mkdir /Qt# cd /Qt # tar -xzvf qt-embedded-2.3.2.tar.gz
export QTDIR=/Qt/qt-2.3.2 export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATHexport PATH=$PATH:$QTDIR/bin
# source /root/.bashrc# echo $PATH
Porting SDKDefault pointer is for mouse.
LDS2000’s LCD is touch screen.The parameter from kernel to application is
must be touch screen, not mouse values.
10
Porting SDKEdit the file “/Qt/qt-2.3.2/src/kernel
/qwsmouse_qws.cpp”
11
Porting SDKEdit the file “/Qt/qt-2.3.2/src/kernel
/qwsmouse_qws.cpp”
12
Porting SDKEdit the file “/Qt/qt-2.3.2/configs/linux-arm-g+
+-shared”
13
-> 9 번째 줄
-> 61 번째 줄
Porting SDKEdit the file “/Qt/qt-2.3.2/Makefile”
14
Modify#all: symlinks src-moc src-mt sub-src sub-tools sub-tutorial sub-examples
all: symlinks src-moc src-mt sub-src sub-tools #sub-tutorial sub-examples
Line #11
Porting SDKRun Makefile
License? YesFeature configuration? 5. Everything(5MB)Pixel depth? 16Frame Buffer support? Yes
15
# cd $QTDIR/configs# ./configure –xplatform linux-arm-g++-shared
Porting SDK Using the command, “ls -al”, in the directory,
“$QTDIR/lib ”
16
Configure target kernel compile configuration Include touch screen driver(ADS7853) to kernel
compile option
17
18
Install tmake - Download
Homepage of Trolltechhttp://www.trolltech.com
FTP server of Trolltechftp://ftp.trolltech.com/freebies/tmake/tmake-
1.8.tar.gz
tmake-1.8.tar.gzDownload and copy to the directory, “/Qt/”
Install tmake - Configure host environment
Release compression
Edit the file “/root/.bashrc”
Refresh the path
19
# tar -xzf tmake-1.8.tar.gz
export TMAKEPATH=/Qt/tmake-1.8/lib/qws/linux-arm-g++ export PATH=$PATH:/Qt/tmake-1.8/bin
# source /root/.bashrc# echo $PATH
Install tmake - Confirm porting “cat $QTDIR/examples/hello/hello.pro”
TEMPLATE: project type (app, lib, subdirs)DEPENDPATH: path of library files
Refer the file “~/tmake-1.8/doc/tmake_ref.html”
20
Install tmake - Confirm porting
Run tmake (-o option)
progen programGenerage .pro file (-o option)header files and source files needed
include all files in current directory
21
# cd $QTDIR/examples/hello# tmake -o Makefile hello.pro
# progen -o hello2.pro hello.h hello.cpp main.cpp
# progen -o hello3.pro
Configure target board environment to use QT library
Copy Qt/Embedded library & font.
Edit the file “/NFS/.bashrc”
22
# mkdir /NFS/usr/local/qt-2.3.2# cp –rf $QTDIR/lib /NFS/usr/local/qt-2.3.2
export QTDIR=/usr/local/qt-2.3.2 export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATHexport QWS_DISPLAY=Transformed:Rot0export QWS_MOUSE_PROTO=TPanel:/dev/ts
Configure target board environment to use QT library
Edit the file “/NFS/etc/inittab”not to execute tiny-X
Test hello
23
#x:5:respawn:/etc/X11/prefdm –nodaemon (# 을 삭제 하세요 .)
# cd $QTDIR/examples/hello# make# cp -rf hello /NFS
[[email protected] /]$ source /.bashrc[[email protected] /]$ /hello -qws
Reference
www.wikipedia.org
24