QT学习记录3
今日将tslib1.4编译进qt
编译选项
./configure -release -shared -fast -no-largefile -qt-sql-sqlite -no-qt3support -no-xmlpatterns -no-mmx -no-3dnow -no-sse -no-sse2 -no-svg -no-webkit -qt-zlib -qt-libtiff -qt-libpng -qt-libmng -qt-libjpeg -make libs -xplatform qws/linux-arm-gnueabi-g++ -nomake tools -nomake examples -nomake docs -nomake demo -no-nis -no-cups -no-iconv -no-dbus -no-openssl -embedded arm -little-endian -qt-freetype -depths 16,18,24 -no-glib -prefix /usr/local/qtarm_516_withts -silent -lrt -qt-mouse-tslib -I/usr/local/tslib-1.4/include -L/usr/local/tslib-1.4/lib
增加了-qt-mouse-tslib -I/usr/local/tslib-1.4/include -L/usr/local/tslib-1.4/lib
使用QtSdk重新编译项目,出现
libQtGui.so: undefined reference to `ts_read_raw'
libQtGui.so: undefined reference to `ts_open'
libQtGui.so: undefined reference to `ts_fd'
libQtGui.so: undefined reference to `ts_config'
。。。
此错误需要修改Qt源码安装包qt-everywhere-source-4.7.3中mkspecs/common/linux.conf文件,将QMAKE_LIBS_THREAD选项改为 QMAKE_LIBS_THREAD=-lphtread -lts
重新编译完成之后,项目的构建配置(qt4.7.3(qtarm_516_withts))的环境变量LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/tslib-1.4
2.
可执行文件执行时,继续报错
No raw modules loaded.
QWSTslibMouseHandlerPrivate: ts_config() failed with error: 'No such file or directory'
Please check your tslib installation!
此错误修改/etc/ts.conf 增加module_raw input
至此为止开发环境基本搭建完成
3.
数据库操作,需要在工程的pro文件中 增加 QT += sql 一行
4.
NULL到对象如何转换??
5.
Q_OBJECT
The Q_OBJECT macro at the beginning of the class definition is necessary for all classes that define signals or slots

浙公网安备 33010602011771号