Hi,
Sorry, I'm not too familiar with the QJSEngine stuff. With QML2 we now allow (via an undocumented interface) modules to provide their own value-types. These types are "QVariant-storable types which have sub-properties" such as QFont, QVector3D and so forth. Take a look at the valuetype related code in QtQuick2 - basically it registers a bunch of types as value types, provides load/store/copy/remove and conversion functions, etc.
It's not too clean, there are hideous dragons in that code, and the interfaces are completely undocumented because they're really still meant for internal use only, but if you want to see how we did it, please feel free to check it out and try to provide your own in your own module.
What we don't allow is any form of operator overloading. Hence, the valuetype mediator classes I implemented had a bunch of Q_INVOKABLE functions (for things like add/sub/mul etc).
Cheers,
Chris.