Access object not created from python

David Boddie david at boddie.org.uk
Wed Dec 2 00:15:44 GMT 2020


On Tue Dec 1 23:08:29 GMT 2020, Jimmy Girardet wrote:

[...]

> window.wheelEvent(event)
> 
> window is created from qml. I get the following error:
> 
> RuntimeError: no access to protected functions or signals for objects
> not created from Python
> 
> I understand the error (window is created in qml), but do you see a
> workaround for what I wanna do ?

Maybe try calling QApplication.instance().postEvent(window, event) or
something similar? The event should be delivered like a normal QWheelEvent.

David


More information about the PyQt mailing list