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

Clear selection in ListView

XMLWordPrintable

    • bccb1a82fd796ca31b8b4777c29344bafc6d71d6

      There is no obvious way to clear the selection (remove the highlight) in a ListView.

      I tried setting the currentIndex property to -1 but that just selected the first item. To my surprise, the highlight was removed when I changed the currentIndex property to a value greater or equal to count. This sounds like a bug?

      I think there should be an obvious way to clear the selection, like having a 'clearSelection' method on the ListView.

        1. bug.qml
          0.5 kB
        2. bug2.qml
          1.0 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            martjone Martin Jones (closed Nokia identity) (Inactive)
            mario Mario Boikov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes