Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.6.1, 6.7.0 FF
-
None
-
-
72c8d39da (dev), c12a90d3e (6.7), 2f57794e5 (6.6), 7b4221002 (dev), ad2d5908f (6.7)
Description
Started to notice new Qt warning at application start after updating from Qt 6.5.3 to 6.6.1.
Final member modelData is overridden in class QQmlDMAbstractItemModelData. The override won't be used.
Here is simple reproducer ModelWarning.zip
import QtQuick import ModelWarning Window { width: 640 height: 480 visible: true ListView { anchors.fill: parent model: TestModel {} delegate: Rectangle { required property string modelData width: ListView.view.width height: 30 Text { anchors.centerIn: parent text: modelData } } } }
Pay attention on the custom C++ model - TestModel, which provides 2 roles to QML, and one of them is "modelData"
QHash<int, QByteArray> TestModel::roleNames() const { return { { SomeRole1, "modelData" }, { SomeRole2, "someRole" } }; }
Previously this was not a problem, but since Qt 6.6.x it provokes the warning.