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

QAbstractItemView: Ctrl-clicking on a selected item opens the editor instead of clearing the selection (ExtendedSelection + SelectedClicked + ItemIsDragEnabled)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.4.1
    • Widgets: Itemviews
    • None
    • All

    Description

      QAbstractItemView: Ctrl-clicking on a selected item opens the editor instead of clearing the selection, while the selection mode is ExtendedSelection, the edit trigger is SelectedClicked, and the item has the ItemIsDragEnabled flag.

      https://github.com/qt/qtbase/blob/905755304a474c942346774d930b92e3665c1bab/src/widgets/itemviews/qabstractitemview.cpp#L4182-L4185

      In QAbstractItemViewPrivate::extendedSelectionCommand, the deselection is not happening on MouseButtonPress if the item is draggable. On MouseButtonRelease, the item is still selected and then triggers the editor. The expected behavior is deselecting the item, as if no ItemIsDragEnabled flag.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            bi11 Yuxin Wang
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes