Ktam3874/pitx software guide, The qt, The first example uses the sourcecode from – Kontron KTAM3874-pITX User Manual

Page 175: And needs the creation of a subdirectory named, The program produces the following screen output

Advertising
background image

KTD-S0057-I

Page 171 Linux® Programming Examples (DebianTM)


KTAM3874/pITX Software Guide


/* Machine Architecture */
#ifndef QT_BOOTSTRAPPED

/*# define QT_ARCH_I386*/
# define QT_ARCH_ARM

#else

/*# define QT_ARCH_I386*/
# define QT_ARCH_ARM

#endif
/* Compile time features */
#define QT_LARGEFILE_SUPPORT 64
#define QT_POINTER_SIZE 4

The Qt

TM

project provides a set of examples on the following webpage

http://qt-project.org/doc/qt-4.8/all-examples.html

The first example uses the sourcecode from '

Dialog Examples/Config Dialog

'

and needs the creation of a

subdirectory named '

images

' for the PNG-files. One possible Makefile might look like this:

DEFINES = -DQT_WEBKIT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED

CXX := arm-linux-gnueabihf-g++ -march=armv7 -I/usr/include/qt4
LDFLAGS := -l QtCore -l QtGui -l QtDBus -l glib-2.0 -l png12 -l expat -l pcre -l uuid -l z

all: qt

qrc_configdialog.cpp: configdialog.qrc images/config.png images/update.png images/query.png

/usr/bin/rcc -name configdialog configdialog.qrc -o qrc_configdialog.cpp

moc_configdialog.cpp: configdialog.h

/usr/bin/moc-qt4 $(DEFINES) -I/usr/include/qt4 configdialog.h -o moc_configdialog.cpp

main.o: main.cpp
configdialog.o: configdialog.cpp
pages.o: pages.cpp

qt: main.o configdialog.o pages.o qrc_configdialog.o moc_configdialog.o

$(CXX) -o $@ main.o configdialog.o pages.o qrc_configdialog.o moc_configdialog.o $(LDFLAGS)

clean:

rm qt main.o configdialog.o pages.o qrc_configdialog.o moc_configdialog.o

The program produces the following screen output.

Advertising
This manual is related to the following products: