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

Editable Tree Model fails QAbstractItemModelTester

    XMLWordPrintable

Details

    • All
    • e65558c230bc48ae9cced1f147180f4e33517791 (qt/qtbase/dev) b269ea10c76fd9d7053d0374d9fd16fff2d79a73 (qt/tqtc-qtbase/tqtc/lts-5.15)

    Description

      The Editable Tree Model example (https://doc.qt.io/qt-6/qtwidgets-itemviews-editabletreemodel-example.html) fails QAbstractItemModelTester "Common error test #3, the second column should NOT have the same children".
      This can be easily solved in multiple ways, the fastest is to insert a check for the column being 0 in rowCount()

      As a side note, that example also leaks the model. Another easy fix passing this as a 3rd argument to the constructor

      Attachments

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

        Activity

          People

            sgaist Samuel Gaist
            VRonin Luca
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes