Overriding QThread.run and calling the default implementation
Maurizio Berti
maurizio.berti at gmail.com
Sat Jul 3 23:05:26 BST 2021
Hi Jeremy and thanks for your answer.
The setEnabled is there just for precaution, it's not essential for the
purpose of the test.
Shame on me, as I forgot to mention that I'm on Linux (tested and
reproducible on an old Gentoo with PyQt5.7 as much as with a newer ~2020
Lubuntu with PyQt5.12) and I get the whole UI frozen, including painting
issues due to failed handling of paint events (including geometry changes).
Under some circumstances I was able to keep the UI responsive for some
time, but at a certain point (usually after trying to resize the window)
the UI freezes. I can also confirm that the whole main event loop is
blocked, since I tried to add a QTimer and it doesn't time out.
Thanks,
Maurizio
Il giorno sab 3 lug 2021 alle ore 22:13 Jeremy Katz <jkatz at volexity.com> ha
scritto:
> On 2/Jul/21 10:55, Maurizio Berti wrote:
> >
> > This results in freezing the whole application as soon as the thread is
> > started.
> > Why does this happen? I believe it could be related to how threading
> works
> > and the whole wrapping, but I'm not sure and I'd like to understand the
> > reason for this anyway.
>
> How are you detecting a freeze? On macOS 11 with PyQt and Qt 5.15.2, the
> application remains responsive in my test. Removing the call to
> self.button.setEnabled(False) and disconnecting the clicked signal
> allows repeat clicks of the button.
>
--
È difficile avere una convinzione precisa quando si parla delle ragioni del
cuore. - "Sostiene Pereira", Antonio Tabucchi
http://www.jidesk.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210704/73698031/attachment.htm>
More information about the PyQt
mailing list