Qt for Embedded Linux Pointer Handling |
The Tslib Mouse Driver |
---|
The tslib mouse driver inherits the QWSCalibratedMouseHandler class, providing calibration and noise reduction functionality in addition to generating mouse events for devices using the Universal Touch Screen Library. To be able to compile this mouse handler, Qt for Embedded Linux must be configured with the -qt-mouse-tslib option as described above. In addition, the tslib headers and library must be present in the build environment. The tslib sources can be downloaded from http://tslib.berlios.de. Use the configure script's -L and -I options to explicitly specify the location of the library and its headers: ./configure -L <path to tslib library> -I <path to tslib headers> In order to use this mouse driver, tslib must also be correctly installed on the target machine. This includes providing a ts.conf configuration file and setting the neccessary environment variables (see the README file provided with tslib for details). The ts.conf file will usually contain the following two lines: module_raw input module linear To make Qt for Embedded Linux explicitly choose the tslib mouse handler, set the QWS_MOUSE_PROTO environment variable as explained above. |
Make sure you are using the correct device file.
As a first step, you can test whether the device file actually gives any output. For instance, if you have specified the mouse driver with
QWS_MOUSE_PROTO=IntelliMouse:/dev/input/mouse0
then try examining the output from the device by entering the following command in a console:
cat /dev/input/mouse0 | hexdump
If you see output from the device printed on the console when you move the mouse, you are probably using the correct device file; otherwise, you will need to experiment to find the correct device file.
Make sure you have sufficient permissions to access the device file.
The Qt for Embedded Linux server process needs at least read permission for the device file. Some drivers also require write access to the device file. For instance, if you have specified the mouse driver with
QWS_MOUSE_PROTO=IntelliMouse:/dev/input/mouse0
then examine the permissions of the device file by entering the following command in a console:
chmod a+rw /dev/input/mouse0
If the device file is actually a symbolic link to another file, you must change the permissions of the actual file instead.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.6-snapshot | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com