[Qt-interest] OS X HID USB events not firing outside main thread
Liam Staskawicz
lstask at gmail.com
Thu Jun 17 23:50:14 CEST 2010
Hi - I'm trying to get a USB HID device running on OS X in its own thread. Our existing code works great when the hid device is scheduled in the main GUI thread, but I need to schedule it in another QThread.
My code looks like: http://pastebin.com/n25JwPtv
When I call schedule() from the main thread, my subsequent callbacks are fired as expected. If I call schedule() at the beginning of QThread::run(), as shown in the snippet, none of the events are fired.
Is there something that needs to be done to kick the CFRunLoop along in a non-main thread? Or does the main thread subscribe exclusively to these events, so that nobody else has access to them? Any other thoughts? Thanks!
Liam
More information about the Qt-interest-old
mailing list