[PyQt] Possible regression in PyQt5.8: unable to convert a C++ 'QVariantMap' instance to a Python object

Phil Thompson phil at riverbankcomputing.com
Fri Mar 3 12:34:36 GMT 2017


On 3 Mar 2017, at 11:08 am, Milorad Pop-Tosic <pop at hiri.com> wrote:
> 
> Hi,
> 
> I am getting this error TypeError: 
> 
> unable to convert a C++ 'QVariantMap' instance to a Python object
> 
> when calling toVariant() method on a QJSValue passed from the QML, but ONLY if passing a JavaScript object which has null as one of its attribute values. 
> 
> The gist that demonstrates the issue:
> https://gist.github.com/poptosic/8af03a4c736c57658c3b66a082834035
> 
> This works fine in PyQt 5.7.

It's due to a change in Qt v5.8.0. Should be fixed in tonight's snapshot.

Thanks,
Phil


More information about the PyQt mailing list