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

SelectionRectangle is fiddly to get working by default

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.9.0 FF
    • Quick: Controls 2
    • None
    • 472eb06f7 (dev), 764c5e030 (6.10), ca7fd2a11 (6.9)

    Description

      https://doc.qt.io/qt-6/qml-qtquick-controls-selectionrectangle.html#selectionMode-prop says

      Drag will only be used if it doesn't conflict with flicking. This means that TableView will need to be configured with interactive set to false, or placed inside a ScrollView

      But setting interactive: false is rather drastic, and there's another option since https://codereview.qt-project.org/c/qt/qtdeclarative/+/569486 : set acceptedButtons: Qt.NoButton. So if there is code that is assuming that it should only work if the inherited Flickable is non-interactive, that needs to change in 6.9.

      Ideally selection by mouse should be possible with minimal code. Even the snippet doesn't work, the way it's written. (src/quickcontrols/doc/snippets/qtquickcontrols-selectionrectangle.qml)

      Maybe we still have some conflict between flicking and selection on touchscreens though; needs investigation.

      There's also the conflict between selecting text if your delegate is a TextField, vs. selecting cells. I suspect that should somehow be resolvable too, but it requires more thought.

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes