Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.15.0
-
-
528547f5d9d6929f41c94e11591dae36f2794ba2 (qt/qtdeclarative/dev)
Description
If we define a custom model with a property of type `QAbstractItemModel *` like that:
Q_PROPERTY(QAbstractItemModel *sourceModel READ sourceModel WRITE setSourceModel NOTIFY sourceModelChanged)
and bind it in qml, we get a runtime qml error:
Cannot assign to property of unknown type "QAbstractItemModel*".
Interesting that if we import quick controls 1 in the qml module:
import QtQuick.Controls 1.6 as QC1
the problem disappears. Even if don't use the QC1(because we use quick controls 2).
Full minimal example with the problem is attached.
Old related bug(I think it's the same problem) is https://bugreports.qt.io/browse/QTBUG-67294