[Interest] qmlRegisterType in python

Cristián Maureira-Fredes Cristian.Maureira-Fredes at qt.io
Wed Feb 5 15:03:34 CET 2020



On 2/4/20 4:04 PM, Jérôme Godbout wrote:
> Hi,
> 
> I was developing a small Python application for a client and I did hit a 
> wall with the qmlRegisterType variant methods. Python PySide2 is missing 
> any qmlRegisterSingletonType and qmlRegisterUncreatableType and the like 
> (PyQt was exposing those). I did find the related issue:
> 
> https://bugreports.qt.io/browse/PYSIDE-574
> 
> it say fix in 5.14 but it’s not, status is reported. I’m a bit confused 
> about the real state of it or it’s the trunk of 5.14 that got the fix?

Usually that it's just to point out the version where it should be fix.
With 5.14.1 released, that remains 5.14, hopefully being fix in the next
released.

There are a couple of things one needs to implement in PySide,
to be able to get those methods available, that's why it's not
straight forward to fix it.


> https://codereview.qt-project.org/c/pyside/pyside-setup/+/249369

On the discussion you can see why that's not being merged,
which is mainly because it exposed the function but had no effect.

> I also found that limitation to be really scary for any serious project 
> planning to use Qt Python:
> 
> https://bugreports.qt.io/browse/PYSIDE-811

As you maybe read on the comments of the issue,
that's something from Qt Quick itself.


One of the first steps to get this done is to implement Q_ENUM,
and I'm currently working on that but I don't have a ETA :(


Cheers



-- 
Dr. Cristian Maureira-Fredes
R&D Manager

The Qt Company GmbH
Erich-Thilo-Str. 10
D-12489 Berlin

Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin,
Registergericht: Amtsgericht
Charlottenburg, HRB 144331 B
--


More information about the Interest mailing list