Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

Mouse Pointer Handling

Pointer handling in Qt Extended works for both mouse and mouse-like devices such as touch panels and trackballs. The various drivers can be enabled and disabled using the configure script. For example:

    ./configure -extra-qtopiacore-config -qt-mouse-tslib

To see the available mouse drivers run:

    <qt-extended-root-dir>/qtopiacore/qt/configure -embedded -help |grep -a1 mouse

Note: By default only the PC mouse driver is enabled.

Available Drivers

Qt for Embedded Linux provides drivers for the MouseMan, IntelliMouse, Microsoft, NEC Vr41XX, Linux Touch Panel and Yopy protocols as well as the universal touch screen library, tslib.

Note: The driver must be specified explicitly for systems with a modem otherwise Qt for Embedded Linux may attempt to try to auto-detect the mouse device and thereby disrupt the modems operation.

Provided that the "pc" mouse driver is enabled, Qt for Embedded Linux will try to auto-detect the mouse device if it is one of the supported types on /dev/psaux or one of the /dev/ttyS? serial lines. If multiple mice are detected, all may be used simultaneously. Note that Qt for Embedded Linux does not support auto-detection of touch panels in which case the driver must be specified explicitly to determine which device to use.

Other drivers can be added by deriving from the QWSMouseHandler and QMouseDriverPlugin classes and using Qt's plugin mechanism.

This can be part of a device configuration profile. For an example implementation, see <qt-extended-root-dir>/examples/mousedriver.

For a tutorial on how to add a new keyboard driver plugin see : Tutorial: Implementing a Device Plug-in

Specifying a Driver

To specify which driver to use, set the QWS_MOUSE_PROTO environment variable. For example (if the current shell is bash, ksh, zsh or sh):

             export QWS_MOUSE_PROTO=<driver>:<device>

The <driver> argument is either MouseMan, IntelliMouse, Microsoft, VR41xx, LinuxTP, Yopy or Tslib, and the <device> argument is typically /dev/mouse for mouse devices and /dev/ts for touch panels. Note that the latter argument is optional.


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3