[PyQt] Conversion from QML
phil at riverbankcomputing.com
Mon Jan 5 10:04:37 GMT 2015
On 03/01/2015 5:10 pm, B. B. wrote:
> Hey Phil,
> The error had actually been easier explained making a short example
> the beginning...
> Attatched is the sources for a very small program that demostrate what
> The introspection is done just by printing to the console.
> I print out in 2 sections - the first "makes sence" with the new
> the second makes sence with the old sources.
> You will notice in the second - with the old sources - the result from
> "getStuff" function is python dicts and lists.
> Which if a much cleaner interface than the QJSValues the getStuff
> with the nevest sources.. :-)
It's a change in behaviour in Qt v5.4 - nothing to do with PyQt.
I could implement the mapping protocol for QJSValue so that __getitem__
calls property(), __setitem__ calls setProperty() and __delitem__ calls
deleteProperty(). Would that help?
More information about the PyQt