[Interest] QML QList<long long> possible?
Thiago Macieira
thiago.macieira at intel.com
Sat Jun 14 02:02:04 CEST 2014
Em sáb 14 jun 2014, às 02:42:43, mailinglist inputoutput escreveu:
> >> Q_PROPERTY(QList<unsigned long long> READ myValue NOTIFY
>
> myValueChanged)
>
> > Yes. What's the problem when you do exactly that?
>
> Thanks for taking the time Thiago!
>
> I register in plugin.cpp (where I also do qmlRegisterType 's):
> qRegisterMetaType<unsigned long long>("myId");
>
> Then inside qml reading myValue via console.log() results in:
>
> QMetaProperty::read: Unable to handle unregistered datatype 'QList<unsigned
> long long>' for property
>
>
> qRegisterMetaType<QList<unsigned long long> >("myId"); // wont work either
> - same result
Try using QList<qulonglong> as your type in the Q_PROPERTY. It's the same, but
the Qt metatype system uses strings for comparison.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list