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

ItemSelectionModel: clarify how this model can be used from QML

XMLWordPrintable

      The items views in QML (TableView, TreeView) handles selection through ItemSelectionModel (QItemSelectionModel). This API works fine when the application is only interested in querying the selection model about the current selection. But if you need to manipulate the selection, the API is more "read-only". The current solution is to go through the QItemSelectionModel API in C++ instead, but documentation like https://doc.qt.io/qt-6/qml-qtqml-models-itemselectionmodel.html doesn't say anything about that.

      We should improve the documentation in (at least) the mentioned file to e.g show an example of how you can create and manipulate a selection from QML/C++.

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

            richard Richard Moe Gustavsen
            richard Richard Moe Gustavsen
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes