[Qt-qml] deriving from classes with REVISION

aaron.kennedy at nokia.com aaron.kennedy at nokia.com
Fri Sep 16 15:25:30 CEST 2011


Hi,

You need to register the QDeclarativeItem revision in your module.  For example,

qmlRegisterRevision<QDeclarativeItem, 1>("MyModule", 1, 0);

Cheers,

Aaron

On 16/09/2011, at 10:11 PM, ext Christian Kamm wrote:

> Hi,
> 
> is there a way to derive from a class with REVISIONed properties while making 
> those properties available from the derived type in QML?
> 
> Example:
> cpp
> class MyItem : public QDeclarativeItem { ... }
> qmlRegisterType<MyItem>("MyModule", 1, 0, "MyItem");
> 
> qml
> import MyModule 1.0
> MyItem { implicitWidth: 12 } // error!
> 
> I've already tried using
> qmlRegisterType<MyItem, 1>(...)
> or increasing MyModule's version to 1.1, but the error remains the same.
> 
> Any suggestions?
> 
> Christian
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-qml



More information about the Qt-qml mailing list