[Qt-interest] QMessageBox auto close...
OSProg
osprog at gmail.com
Fri Jul 10 00:45:38 CEST 2009
Hi,
In the winEvent() I catch DBT_DEVICEARRIVAL and DBT_ROMOVECOMPLETE when my USB device is pluged or unpluged.
I'd like to pop-up a QMessageBox when the USB device is removed and to close the box when it is connected again.
>From the winEvent I'm calling a slot from my communication class where the QMessageBox is created and I connect its close slot to a signal from DBT_ROMOVECOMPLETE. It works fine ... almost. The problem is that when the message appears, the DBT_ROMOVECOMPLETE event is received about a minute after the USB device is connected. When I comment out the QMessageBox creation code, this message is received after 2 seconds.
Why is this delay? How can I solve that?
Regards,
Nikolay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090709/21ef6c91/attachment.html
More information about the Qt-interest-old
mailing list