[Interest] QML: Public API for creating user defined basic types

Alan Alpert 416365416c at gmail.com
Fri Aug 9 23:58:31 CEST 2013

On Fri, Aug 9, 2013 at 6:51 AM, Peter Koek <peter_koek at hotmail.com> wrote:
> As explained on stackoverflow
> (http://stackoverflow.com/questions/15535694/how-to-create-custom-basic-type-in-qml),
> creating user defined QML basic types is not currently supported, but can be
> done through private parts of Qt Quick.
> I feel this is a limitation as I want to be able to define my own intuitive
> basic type that acts as a single construct, while still having different
> properties (like the Qt.vector3d with x, y and z). My issue with defining
> object-type properties is that its properties act separately (different
> signals, bindings, etc.). It also adds a level of indirection, which makes
> it a hassle to store the data in the property-holding class (instead of in
> the object of the property itself).
> Will the API for creating user defined basic types be made public anytime
> soon?

It's not on the roadmap. So there are no plans to make it public
anytime soon, but with enough interest and new contributors it could
happen (main work item being that it needs a thorough API review).

> In the meantime, can I go ahead and use the private API, or are there major
> changes planned?

Depends on what version you're using, because we just integrated major
changes to the engine into the dev branch (prospective 5.2.0) which I
believe impacted basic types. There are no "planned" major changes
after that one, but it could still happen at any time, and there's
plenty of time to plan more changes even before 5.2 is out.

Alan Alpert

More information about the Interest mailing list