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

qmllint cannot find QModelIndexList type from selectedIndexes property

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.5
    • 6.3.2
    • QML: Tooling

    Description

      When trying to use qmllint on the following small example, it will report an error that it cannot find the QModelListIndex type when accessing tge selectedIndexes property:

       

      import QtQml.Models 6.3
      import QtQuick 6.3
      
      Item {
          TableView {
              id: tableView
          }
      
          Component.onCompleted: {
              var selectedCount = tableView.selectionModel.selectedIndexes.length
          }
      }
      

      The error is:

      Warning: smallexample.qml:10:54: Type "QModelIndexList" of property "selectedIndexes" not found. This is likely due to a missing dependency entry or a type not being exposed declaratively.
              var selectedCount = tableView.selectionModel.selectedIndexes.length
      

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            knutt Knut Tidemann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes