日期:2014-05-16  浏览次数:20672 次

fl2440移植Qt 4.8.4遇到的问题,程序没法正常运行。
本帖最后由 D_freddy 于 2013-07-13 14:45:49 编辑
   自己在fl2440上移植了Qt4.8.4。但是运行测试程序(包括qt自带demo)的时候屏幕中间只有一个鼠标箭头,其他什么都没有。纠结好久了都没解决。其中有个测试程序如下:
#include <QApplication>
#include <QPushButton>
#include <stdio.h>
int main( int argc, char* argv[] )
{
   QApplication a(argc, argv );  
   QPushButton* hello = new QPushButton( "Hello world!", 0 );
   hello -> resize( 200, 100 );
   hello -> show();
   return a.exec();
}
我发现这个程序只能执行到hello->resize();而hello->show() 没有执行。

以下是板子环境及配置:
linux 内核版本:   linux 2.6.32
交叉编译器版本:   4.4.3
qt        版本:   qt-everywhere-opensource-src-4.8.4 

环境变量:
#tslib path
export TSLIB_TSDEVICE=/dev/event0
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_PLUGINDIR=/lib/ts
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
#qt path
export QTDIR=/usr/qt4
export QTDIRlib=/usr/qt4/lib
export LD_LIBRARY_PATH=$QTDIRlib:$LD_LIBRARY_PATH
export QWS_MOUSE_PROTO=tslib:/dev/event0 
export QWS_DISPLAY=LinuxFb:mmWidth76:mmHeight44:1
export QWS_SIZE=480x272
export QT_QWS_FONTDIR=/usr/qt4/lib/fonts

配置qt时的配置项:
./configure \
-opensource \
-confirm-license \
-release -shared \
-embedded arm \
-xplatform qws/linux-arm-g++ \
-depths 16,18,24 \
-fast \
-optimized-qmake \
-pch \
-qt-sql-sqlite \
-qt-libjpeg \
-qt-zlib \
-qt-libpng \
-qt-freetype \
-little-endian -host-little-endian \
-no-qt3support \
-no-libtiff -no-libmng \
-no-opengl \
-no-mmx -no-sse -no-sse2 \
-no-3dnow \
-no-openssl \
-no-webkit \
-no-qvfb \
-no-phonon \
-no-nis \
-no-opengl \
-no-cups \
-no-glib \
-no-xcursor -no-xfixes -no-xrandr -no-xrender \
-no-separate-debug-info \
-nomake examples -nomake tools -nomake docs \
-qt-mouse-tslib \
-I/usr/local/tslib/include \
-L/usr/local/tslib/lib