[PyQt] AttributeError: 'QPaintEvent' object has no attribute 'region'
kovid at kovidgoyal.net
Mon Apr 20 03:27:58 BST 2020
It will be because there is some Qt plugin/style installed on the system
that is sending classes that are not QPaintEvent to paintEvent. I've
seen this before with other types of events on Linux systems.
On Sun, Apr 19, 2020 at 08:37:43PM +0200, Florian Bruhin wrote:
> I've been getting crash reports looking like this from someone:
> Traceback (most recent call last):
> File "/usr/lib/python3.8/site-packages/qutebrowser/mainwindow/tabwidget.py", line 681, in paintEvent
> if not event.region().intersects(self.tabRect(idx)):
> AttributeError: 'QPaintEvent' object has no attribute 'region'
> - PyQt 5.14.2
> - Qt 5.14.2
> - Python 3.8.2
> - sip 5.1.2.
> - EndeavourOS Linux which seems to be based on Archlinux
> Does anyone have an explanation on how this could happen? Looking at
> sip/QtGui/qevent.sip, QPaintEvent definitely has a region() member, and it's
> not conditional in any way...
> me at the-compiler.org (Mail/XMPP) | https://www.qutebrowser.org
> https://bruhin.software/ | https://github.com/sponsors/The-Compiler/
> GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
> I love long mails! | https://email.is-not-s.ms/
> PyQt mailing list PyQt at riverbankcomputing.com
Dr. Kovid Goyal
More information about the PyQt