Re: AttributeError: 'QPaintEvent' object has no attribute 'region'

Kovid Goyal <[email protected]> Mon, 20 Apr 2020 07:57:58 +0530
Newsgroups gmane.comp.python.pyqt-pykde
Message-ID <20200420022758.GR1541@qedette>
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:
> Hey,
> 
> 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...
> 
> Florian
> 
> -- 
> [email protected] (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    [email protected]
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt


-- 
_____________________________________

Dr. Kovid Goyal 
https://www.kovidgoyal.net
https://calibre-ebook.com
_____________________________________
_______________________________________________
PyQt mailing list    [email protected]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt