[Qt-interest] Porting a custom input device driver from Qt Embedded to Qt X11

Sean Harmer sean.harmer at maps-technology.com
Fri Oct 1 15:47:26 CEST 2010


Hi,

On Friday 01 October 2010 14:25:24 Markus Franke wrote:
> Dear all,
> 
> we have a Qt Embedded 3.3.5 based application which we want to port to Qt
> X11 3.3.8. Of course there is actually not much work to do apart from
> compiling the application against the corresponding libraries.
> 
> However, we have a custom input device (rotary encoder) which is controled
> via a QWSMouseHandler/libusb based driver. Unfortunately, all QWS classes
> don't exist anymore within Qt X11 and so we have to find another approach
> how to deal with our input device.
> 
> Which is the preferred way to implement a driver for such a device with
> the X11 based Qt version? The device is connected via an FTDI chip and the
> USB port.

We have a similar device by the sounds of it that also uses the FTDI usb chip. 
In our case it simply marshalls standard serial comms over usb. What we have 
done is to create a class that represent our device and contains a pointer to 
an instance of a QextSerialPort which we then point at /dev/ttyUSB0 (or 
whatever device it appears as).

Our device class then emits signals in response to hardware events but if you 
get very rapid hardware events you may want to look into posting events to the 
QApplication object instead as they are lighter than using signal/slot 
connections.

HTH,

Sean



More information about the Qt-interest-old mailing list