I want to use QQmlListProperty to access list-values in QML. The class where I register the list with
Q_PROPERTY(QQmlListProperty<int> items READ items)
is a singleton class. I register it with
qmlRegisterSingletonType<Appointment::MVC::ApModel>("appointment.model.apmodel",1,0,"ApModel",Appointment::MVC::apModelSingletonTypeProvider);
in my main.cpp. The usage of other properties works fine, but when I want to access the list, QML prints out the following error:
QMetaProperty::read: Unable to handle unregistered datatype ‘QQmlListProperty<int>’ for property ‘Appointment::MVC::ApModel::items’
Did I forget something?
↧








