[PyQt] Too many signals fired in short timespan: one step closer to solution

michael h michaelkenth at gmail.com
Fri Jun 15 00:44:19 BST 2018


>
>
> I noticed that the repeated call to app.processEvents() is the culprit,
> when called too often in a short timespan. Removing that line from the code
> in the slot, solved the issue. But it takes down the responsiveness of my
> GUI. So I thought, why not query first if there are any events to get
> processed anyway? Unfortunately, the function hasPendingEvents() is not
> safe to use when there are any non-main-threads running in the entire
> application. That's not okay.
>
>
I would've thought that you would not need to call processEvents if you are
using background threads and sending update signals simply to refresh the
UI. The GUI is blocked by actual GUI updates?
In your example you have added actual work to the main thread which seem
will obviously block it... what is blocking the GUI your actual app?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20180614/a5b76108/attachment.html>


More information about the PyQt mailing list