进入/qtopia-core-opensource-src-4.2.2/src/gui/embedded目录,要对qmouse_qws.h qmouselinuxtp_qws.h qmouselinuxtp_qws.cpp这三个文件做修改。
打开qmouselinuxtp_qws.h这个文件加入以下定义。 #define QT_QWS_IPAQ
#define QT_QWS_IPAQ_RAW
打开qmouselinuxtp_qws.cpp:
找到//mousePos = handler->transform(mousePos);清掉注释。 再找到#if defined(QT_QWS_IPAQ)
# ifdef QT_QWS_IPAQ_RAW
//mousedev = QLatin1String("/dev/h3600_tsraw");
mousedev = QLatin1String("/dev/ts0");
# else
//mousedev = QLatin1String("/dev/h3600_ts");
mousedev = QLatin1String("/dev/ts0");
# endif
#else
mousedev = QLatin1String("/dev/ts0");
#endif //因为我的驱动是/dev/ts0.其实只要改第一个就行了.因为定义了.
去掉//mousePos = handler->transform(mousePos);注释后编译报错,只需要把qmouse_qws.h中的transform()函数改成public的就可以了。如下: public:
bool sendFiltered(const QPoint &, int button);
QPoint transform(const QPoint &);