Access object not created from python

Jimmy Girardet ijkl at netc.fr
Wed Dec 2 08:00:32 GMT 2020


thanks for the ti, I solved it with .

By the way it's the first time I post on this list,  I wanna let you 
know  about a pytest-qml plugin I did.

This PyTest plugin allows you to run qml tests via pytest instead of the 
C++/QtQuick test runner. It supports both PySide2 and PyQt5 >= 5.14.2 , 
using the same api as QtQuickTest.

https://jgirardet.github.io/pytest-qml/

Have a nice day

Jimmy


02/12/2020 à 01:15, David Boddie a écrit :
> 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