QT mouse

本文介绍如何在嵌入式Linux环境下下载并配置Qt 3.1.2版本,包括应用补丁、编译安装步骤及设置环境变量来运行Qt程序的方法。此外还提供了针对不同鼠标类型(如触摸屏、PS2鼠标、USB鼠标)的配置指南。
摘要由CSDN通过智能技术生成
  First, down load Qt version 3.1.2 from the Trolltech web site.

Then apply this patch to the Qt source code and use the following commands on your PC to build Qt:

export QTDIR=`pwd`
./configure -embedded arm -qt-mouse-linuxtp -DQT_QWS_ADS
gmake

Put the 'lib' directory on your board (a conventient way to do this is with NFS, alternatively, you could use a jffs or cramfs on the on-board flash memory).

To run a Qt program on your board, use the following commands (assuming that the lib directory is in /nfs/qt/lib):

export QTDIR=/nfs/qt
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$QTDIR/lib
export QWS_MOUSE_PROTO=linuxtp

For a PS2 mouse the last line should be changed to:

export QWS_MOUSE_PROTO=IntelliMouse

For a serial mouse:

export QWS_MOUSE_PROTO=Microsoft

To run the example in $QTDIR/examples/widgets:

./widgets -qws

Here is a calibration program (adapted from Opie) that you can use to calibrate the touch screen. This program saves the calibration parameters in the file /etc/pointercal.

  For a USB mouse, use:

           export QWS_MOUSE_PROTO=IntelliMouse


and replace /dev/psaux with a link to /dev/input/mice, i.e.

           cd /dev
           rm psaux
           ln -s input/mice psaux


Qt will see the USB mouse as a PS2 mouse.

To configure the kernel to support USB mice, be sure the following are enabled in your kernel configuration:

           CONFIG_INPUT=y
           CONFIG_INPUT_MOUSEDEV=y
           CONFIG_USB_HID=y
           CONFIG_USB_HIDINPUT=y
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值