[PyQt] PyQt5 Alternative to setHandlesChildEvents

Kyle Altendorf sda at fstab.net
Sun Jul 23 01:53:03 BST 2017



On July 22, 2017 6:29:42 PM EDT, James O'Hea <annex12 at hotmail.com> wrote:
>I have been porting a PyQt4 application to use PyQt5. Everything seems
>to work fine apart from one thing: setHandlesChildEvents is now
>obsolete with QGraphicsItemGroup meaning I can no longer pick up on
>click events on my items within a group.
>
>What is the alternative approach with PyQt5? I have tried replacing it
>with self.MyGroup.setFiltersChildEvents(False) but this has no effect.

I haven't worked with graphics items but...

http://www.qtcentre.org/threads/66799-setHandlesChildEvents()-obsolete
https://bugreports.qt.io/browse/QTBUG-6861

They seem relevant, perhaps they will be useful.  It does seem that the issue and solution are not related to Python specifically.

Cheers,
-kyle


More information about the PyQt mailing list