Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-130705

QQmlListProperty is missing documentation for object / data

    XMLWordPrintable

Details

    • 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);
          }
      } 

      Attachments

        For Gerrit Dashboard: QTBUG-130705
        # Subject Branch Project Status CR V

        Activity

          People

            ulherman Ulf Hermann
            peppe Giuseppe D'Angelo
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: