[Qt-interest] DBT_DEVICEARRIVAL delayed...

OS Prog osprog at gmail.com
Fri Jul 24 10:16:56 CEST 2009


Hi,

I try to popup a msg box at USB device remove, and hide the same box if it
is connected again. I capture the DBT_DEVICEARRIVAL and
DBT_DEVICEREMOVECOMPLETE.
At DBT_DEVICEREMOVECOMPLETE I pop-up QMessageBox with Abort and Retry
buttons. The default is Retry. At DBT_DEVICEARRIVAL I call "close()" slot of
this message box, so the msg box to disapear and to retry to connect. It
works, but:
If the QMessageBox is running, the DBT_DEVICEARRIVAL comes after a minnute
or so. During this time, if I press Retry, it connects to the USB and
DBT_DEVICEARRIVAL comes.
If the QMessageBox is not running, the DBT_DEVICEARRIVAL comes much faster
(a second or so).
I'm running everithing in one thread, could that be the reason?

Best regards,
Nikolay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090724/3bddb101/attachment.html 


More information about the Qt-interest-old mailing list