[PyQt] PyQt signals priority

Phil Thompson phil at riverbankcomputing.com
Sun Mar 31 17:48:43 BST 2019


On 31 Mar 2019, at 5:26 pm, <kristof.mulier at telenet.be> <kristof.mulier at telenet.be> wrote:
> 
> Hi,
> Is there a way to set a priority on programmatically fired pyqt signals?
> I've posted a StackOverflow question about the matter:
> https://stackoverflow.com/questions/55442777/pyqt5-how-to-set-a-priority-to-a-pyqtsignal
> Please leave your reply on the StackOverflow page (or send it over mail).

You have misunderstood how signals work. Unless you are using a queued connection emitting a signal simply invokes a list of callbacks (ie. the slots).

If your GUI is freezing then your slots are taking too long to run without giving the event loop a chance. Call QCoreApplication.processEvents() in your slot.

Phil


More information about the PyQt mailing list