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

Editable Tree Model Example is incomplete

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4: Low P4: Low
    • None
    • 5.14.2
    • Documentation
    • None

      Following step by step the Editable Tree Model Example (https://doc.qt.io/qt-5/qtwidgets-itemviews-editabletreemodel-example.html) leads to an incomplete result. While the TreeItem class is mostly complete (only missing the explanation for its removeColumns method), the TreeModel itself is almost entirely omitted. It's basically missing explanations for the following:

      QVariant TreeModel::data(const QModelIndex &index, int role) const
      QVariant TreeModel::headerData(int section, Qt::Orientation orientation, int role) const
      bool TreeModel::insertColumns(int position, int columns, const QModelIndex &parent)
      bool TreeModel::insertRows(int position, int rows, const QModelIndex &parent)
      bool TreeModel::removeColumns(int position, int columns, const QModelIndex &parent)
      bool TreeModel::removeRows(int position, int rows, const QModelIndex &parent)
      bool TreeModel::setData(const QModelIndex &index, const QVariant &value, int role)
      bool TreeModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role)
      void TreeModel::setupModelData(const QStringList &lines, TreeItem *parent)
      

      The main window code is also entirely omitted.

      I'm very well aware that the example is already huge and complex, but reaching the end after an hour and realizing that you actually don't have half what you need to understand the whole picture is pretty unsettling.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            docteam Qt Documentation Team
            ux U X
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes