USB Communication in qt
-
I find libusb API libusb_bulk_transfer() to transfer data.

But I need to know when USB data comes.Do Qt have "USB Receive Signal" like Serial Port's?


Where I should use libusb API libusb_bulk_transfer()?Thanks for your reply.
-
I find libusb API libusb_bulk_transfer() to transfer data.

But I need to know when USB data comes.Do Qt have "USB Receive Signal" like Serial Port's?


Where I should use libusb API libusb_bulk_transfer()?Thanks for your reply.
@Qtcpp_User said in USB Communication in qt:
But I need to know when USB data comes.Do Qt have "USB Receive Signal" like Serial Port's?
No. As you have found,
QIODevices emitreadyRead()signal when one or more bytes are received and available to be read. Qt does not have (or at least expose) any special handling for USBs, and probably (can't be sure) does not use this libusb library.Where I should use libusb API libusb_bulk_transfer()?
You should not use such a call yourself, assuming you are allowing Qt to handle the serial/USB port. If you want to write your own code for handling USB I/O that is a different matter.