Details
Description
Trying to expose a QAbstractItemModel derived class as a property from Python to QML is somewhat confusing.
When choosing the model's class type or QAbstractItemModel as the property type, the QML engine throws an error along the lines of QMetaProperty::read: Unable to handle unregistered datatype 'QAbstractListModel*' for property 'LockHandler::qmlModel'.
One would expect this to work, since QAbstractItemModel is a QObject derived class.
Instead, exposing the model a QObject or QVariant type property leads to the correct results.
I attached an example program which shows different ways of exposing the model to QML and what is seen from QML.
Attachments
Issue Links
- relates to
-
PYSIDE-1827 QSemaphore* is not registered as meta type
- Closed