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

ListView.isCurrentItem not available until model is refreshed

    XMLWordPrintable

Details

    • d9f9d773e92940786f159897623618f3bf6bcf0f (qt/qtdeclarative/dev) 27b0d193f6c9e320638cd0c19414a78c9caeee72 (qt/qtdeclarative/6.2) 4cf8b6732a627cc73d22c95bd080dba447afb2e3 (qt/tqtc-qtdeclarative/5.15), 9124fcecb (dev), 058787ce5 (6.5), 59b4159eb (6.4)

    Description

      Please refer to the attached sample that demonstrates that the "ListView.isCurrentItem" attached property is not available in a delegate of a DelegateModel until user presses a key to refresh the model.

      Setting model in component.onComplete of ListView solves this issue, but Binding of model with listview is broken and it won't work with a model coming from a property.

      Attachments

        1. evensimpler.qml
          0.6 kB
          Shawn Rutledge
        2. qtbug86744.zip
          2 kB
          Shveta Mittal

        Issue Links

          For Gerrit Dashboard: QTBUG-86744
          # Subject Branch Project Status CR V

          Activity

            People

              ivan.solovev Ivan Solovev
              shmittal Shveta Mittal (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: