Ktam3874/pitx software guide – Kontron KTAM3874-pITX User Manual

Page 193

Advertising
background image

KTD-S0057-I

Page 189 Linux® Programming Examples (DebianTM)


KTAM3874/pITX Software Guide


class View : public QGraphicsView
{
public:

View (QGraphicsScene *scene) : QGraphicsView (scene) { }


protected:

void resizeEvent (QResizeEvent *event)

{

QGraphicsView::resizeEvent

(event);

fitInView (sceneRect (), Qt::KeepAspectRatio);

}
};


The fourth example handles the OpenGL

®

interface from '

OpenGL Examples/Grabber

'

. However, this requi-

res additional steps. The standard Debian

TM

image contains the OpenGL

®

library named '

libGL.so.1

' but you

need also the Qt OpenGL

®

library named '

libQtOpenGL.so.4.8.2

'. In order to do that download the Qt Open-

GL

®

environment on the target hardware with

sudo apt-get install libqt4-opengl-dev

The following download message appears (extract):

The following extra packages will be installed:
libgl1-mesa-dev libglu1-mesa-dev libmysqlclient18 libpthread-stubs0
libpthread-stubs0-dev libqt4-declarative libqt4-designer libqt4-dev
libqt4-dev-bin libqt4-help libqt4-network libqt4-opengl libqt4-qt3support
libqt4-script libqt4-scripttools libqt4-sql libqt4-sql-mysql libqt4-svg

libqt4-test libqt4-xmlpatterns libqtwebkit-dev libqtwebkit4 libx11-dev
libx11-doc libxau-dev libxcb1-dev libxdmcp-dev libxext-dev mesa-common-dev
mysql-common qt4-linguist-tools qt4-qmake x11proto-core-dev
x11proto-input-dev x11proto-kb-dev x11proto-xext-dev xorg-sgml-doctools
xtrans-dev
Suggested packages:
libqt4-declarative-folderlistmodel libqt4-declarative-gestures
libqt4-declarative-particles libqt4-declarative-shaders qt4-qmlviewer
firebird-dev libmysqlclient-dev libpq-dev libsqlite0-dev libsqlite3-dev
qt4-dev-tools qt4-doc unixodbc-dev libxcb-doc libxext-doc
The following NEW packages will be installed:
libgl1-mesa-dev libglu1-mesa-dev libmysqlclient18 libpthread-stubs0
libpthread-stubs0-dev libqt4-declarative libqt4-designer libqt4-dev
libqt4-dev-bin libqt4-help libqt4-network libqt4-opengl libqt4-opengl-dev
libqt4-qt3support libqt4-script libqt4-scripttools libqt4-sql
libqt4-sql-mysql libqt4-svg libqt4-test libqt4-xmlpatterns libqtwebkit-dev

libqtwebkit4 libx11-dev libx11-doc libxau-dev libxcb1-dev libxdmcp-dev
libxext-dev mesa-common-dev mysql-common qt4-linguist-tools qt4-qmake
x11proto-core-dev x11proto-input-dev x11proto-kb-dev x11proto-xext-dev
xorg-sgml-doctools xtrans-dev


Now you can find some additional Qt

TM

libraries in the directory

/usr/lib/arm-linux-gnueabihf

(extract): lib-

QtDeclarative.so.4.8.2, libQtNetwork.so.4.8.2, libQtOpenGL.so.4.8.2, libQtScript.so.4.8.2, libQtScriptTools
.so.4.8.2, libQtSql.so.4.8.2, libQtSvg.so.4.8.2 and libQtWebKit.so.4.9.0.
The best way for development consists in the use of these libraries which should be copied from the target
hardware to the cross compiler environment. Maybe a link creation or renaming of library files could be
required.

Advertising
This manual is related to the following products: