Department of Computer Engineering Dongguk University Prof. Jin-Woo Jung Practice hour : 2008/11/14 8. Qt / Embedded
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 Windows Qt/Embedded — Qt for embedded platforms (PDA, etc...) Qt Jambi — Qt for Java 3 What is the Qt?
Qt: GUI library Based on X-window Qt/Embedded Based on Frame Buffer which is resource of kernel Frame Buffer Virtual buffer for graphic hardware Some graphic cards have physical hardware for frame buffer Some 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 globalization open source.
Qt/Embedded vs Qt/X11 6
Qt/Embedded Install steps Download SDK Port host environment to use Qt library Porting SDK Configure SDK source files embedded hardware environment Compile SDK Confirm 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 Trolltech FTP server of Trolltech ftp://ftp.trolltech.com/qt/source/qt-embedded-free tar.gz qt-embedded-free tar.gz Download and copy to the directory, “/Qt/” 8
Porting SDK Release compression Edit the file “ /root/.bashrc” Refresh the path 9 # mkdir /Qt # cd /Qt # tar -xzvf qt-embedded-free tar.gz #mv qt-embedded-free qte export QTDIR=/Qt/qt export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH export PATH=$PATH:$QTDIR/bin # source /root/.bashrc # echo $PATH
Porting SDK Default pointer is for mouse. LDS4000’s LCD is touch screen. The parameter from kernel to application is must be touch screen, not mouse values. 10
Porting SDK Edit the files, “ $QTDIR/src/embedded/qmouse_qws.h”, “$QTDIR/src/embedded/qmouse_linuxtp_qws.cpp ”. Refer to the file setting manual, “LDS2000_ 보드에 _QT-e 포팅하기.pdf” 11
Porting SDK Edit the file “ /Qt /qt-3.3.3/Makefile” 12 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 SDK Run Makefile License? Yes Pixel depth? 16 Make the file 13 # cd $QTDIR/configs #./configure -embedded arm -shared -debug -no-cups -continue -thread -qt-mouse- linuxtp # make
Configure target board environment to use QT library Copy Qt/Embedded library & font. Edit the file “ /NFS/.bashrc” 14 # mkdir /NFS/usr/local/qt # cp –rf $QTDIR/lib /NFS/usr/local/qt export QTDIR=/usr/local/qt export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH export QWS_DISPLAY=Transformed:Rot0 export QWS_MOUSE_PROTO=linuxtp
Configure target board environment to use QT library Test hello 15 # cd $QTDIR/examples/hello # make # cp -rf hello /NFS /]$ source /.bashrc /]$ /hello -qws
Reference