Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.8
-
8fc186e1a (dev), 643426716 (dev), 5db17816f (6.9), b61bd7cb3 (6.9), 6e1577cfa (6.8), 0913fe1c1 (6.8), a48071da9 (dev), 7c8eed416 (6.9), d2bb2002f (6.8)
-
framework-content 4, framework-content 5, framework-content 6
Description
Any usage of QQmlListProperty requires accessing the inner object / data fields. But those fields are undocumented: https://doc.qt.io/qt-6/qqmllistproperty.html
The example https://doc.qt.io/qt-6/qtqml-tutorials-extending-qml-example.html#chapter-5-using-list-property-types shows the fields being accessed:
void PieChart::append_slice(QQmlListProperty<PieSlice> *list, PieSlice *slice) { PieChart *chart = qobject_cast<PieChart *>(list->object); // <-- here if (chart) { slice->setParentItem(chart); chart->m_slices.append(slice); } }