ltib环境中QT Embedded应用开发

1. 在ltib/rpm/BUILD/qt-everywhere-opensource-src-4.6.0/demos下面建立子目录xx

2. 编辑demos.pro添加demos_xx相关的子目录

3. 仿照其他的嵌入式demo写出.pro文件如下:

 

SOURCES += main.cpp
SOURCES += mainwindow.cpp
HEADERS += mainwindow.h

FORMS += mainwindow.ui

build_all:!build_pass {
    CONFIG -= build_all
    CONFIG += release
}

# install
target.path = $$[QT_INSTALL_DEMOS]/xx
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.png *.jpg *.plist *.icns *.ico *.rc *.pro *.html *.doc images
sources.path = $$[QT_INSTALL_DEMOS]/xx
INSTALLS += target sources

symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)

 4. 拷贝windows环境下面的qt应用源代码到ltib/rpm/BUILD/qt-everywhere-opensource-src-4.6.0/demos/xx下面。注意xx.pro文件不要覆盖。

5. 执行qmake -spec ../../mkspecs/qws/linux-g++-mx -unix -o Makefile xx.pro

6. 执行make可以生成执行程序: xx

7. 将xx拷贝到evk

8. 设置环境变量并运行

 

export QTDIR=/usr
export LD_LIBRARY_PATH=$QTDIR/lib
export QT_QWS_FONTDIR=$QTDIR/lib/fonts
./xx

你可能感兴趣的:(linux,嵌入式,qt,Symbian,OpenSource)