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

TableView add element and select problem

    XMLWordPrintable

Details

    Description

      I am trying to add ListElement into ListModel connected to TableView and select that new item in TableView using selection.select().

      myModel.append({"name": "this is new item"});
      myTableView.selection.clear();
      var selectIndex = myModel.count-1
      myTableView.selection.select(selectIndex)
      

      It tells me following error message:

      qml: TableViewSelection: index out of range
      

      For more details please look into attached example.

      Attachments

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

        Activity

          People

            srutledg Shawn Rutledge
            xmlich02 Jozef Mlich
            Votes:
            4 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes