문제

I wanted to have a sleeping thread that will be waked when a specifc USB device is inserted (VID and PID matches the ones I am expecting). How may I connect QThreads to Windows native notifications and make this work?

도움이 되었습니까?

해결책

You can use the QAbstractNativeEventFilter to make a subclass for your Windows event.

As for your thread, you could use QWakeCondition to wait for this event to happen.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top