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

QListItemView with SingleSelection unselects item when clicking on empty area

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.2.8, 6.4.3, 6.5.0, 6.6.0
    • 6.3.1, 6.4.0 Beta3
    • Widgets: Itemviews
    • None
    • My testing and bisecting was done on macOS / arm64.
      Our use case in OBS (where we discovered this) shows that it also happens on Windows and Linux.
    • All
    • f11e5435c (dev), 2e898a6a5 (6.5), 0b2ca3ee3 (tqtc/lts-6.2), 51464de4a (6.4)

    Description

      It's possible to unselect an item in QListItemView in SingleSelection mode by clicking into the area of the item view without an item.
      Bisecting the issue shows that it was introduced in dfb4697e, which was supposed to fix an issue where it was possible to unselect an item when control-dragging while it should only be possible to unselect an.

      To reproduce, use the attached sample project. Select an item.
      On current master, pressing the empty area below "Fifth item" will unselect the current item.
      With dfb4697e reverted, clicking below the empty area leaves the selected item selected.

      Intended.mov and Actual.mov show me clicking the cursor on the empty area.

      Attachments

        1. Actual.mov
          338 kB
        2. Intended.mov
          266 kB
        3. QTBUG Sample Project-1.zip
          6 kB
        For Gerrit Dashboard: QTBUG-105870
        # Subject Branch Project Status CR V

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            gxalpha Sebastian Beckmann
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: