PDA

View Full Version : Qt applications and USB



pocketchange
10th March 2011, 22:17
I'm relatively new to Qt and I've been hoping to write an application that is cross-platform, but uses USB to communicate to a device. I'm curious how this might work in Qt. Does Qt have a means of talking to USB (hearing plug/unplug events, communicatoin, etc.) or do I need to solve that problem for each platform?

squidge
10th March 2011, 23:21
Qt itself does not support USB, so you will have to solve that problem on each platform.

However, if the USB communication is something like a virtual serial port which you have drivers for, then Qt can told to your USB device using a serial port class (such as Qextserialport, QSerialPort, etc). This is quite common so hopefully it does.

kuzulis
11th March 2011, 05:16
What kind of USB device? USB/Serial converter or what?
If the USB / Serial - using the fact that advised above or QSerialDevice (http://qt-apps.org/content/show.php?content=112039).
If another type of USB device - the would probably "libusb".