How to create custom basic type in QML?
c++, customization, qml, qt, types
Solution
I assume you want to register more complex types than int, bool, real, since they are already present.
You cannot do this in Qt 4.x. It is possible in Qt 5 (QML 2), but there is no public API. If you still want to do it, you'll need to dig into some code to see how its done, as there's no documentation.
You need to implement a QQmlValueTypeProvider (qqmlglobal_p.h) and create QQmlValueTypeBase<> subclasses (qqmlvaluetype_p.h) for each of your types. Then register your value type provider with QQml_addValueTypeProvider() in your plugin's registerTypes().
One example you could look at are QGeoCoordinate, QGeoRectangle, etc. from QtLocation module: http://qt.gitorious.org/qt/qtlocation/trees/master/src/imports/location
Good luck.
Problem
I don't seem to find any resources on adding basic types to QML. I don't mean QObject or higher derived elements, but the basic types - bool, int, real and so on. Didn't have any luck digging for it in the sources as well... So any info is appreciated.