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

QML ListView steals input from its delegates

    XMLWordPrintable

Details

    • macOS

    Description

      Likely related to QTBUG-125904.

      When a ListView has interactive: true, it prevents a delegate with PointHandler from receiving pointChanged regardless of its grabPermissions.

      In the discussion on QTBUG-125904, there was the suggestion of using a MultiPointTouchArea within the delegate to prevent the ListView from stealing the input. However, this works in such a limited way as to make it ineffective.

      I have attached a small demo. This displays 3 handmade sliders and a Qt.Controls slider. For the handmade sliders, you can either grab the slider handle and move it, or click/drag anywhere on the slider track.

      • The top slider is a standalone slider. While dragging, if you drag diagonally or like an infinity symbol, so that there is a vertical component, this handles it fine.
      • The 2nd slider is within a ListView but it has the MultiPointTouchArea blocker. This allows dragging and handles a very small amount of vertical drag, within the default dragThreshold. However any vertical drag beyond that results in the ListView taking over not just the vertical component but completely preventing the delegate slider from working.
      • The 3rd slider is within a ListView without any special handling. Dragging just doesn't work.
      • The 4th slider is in a separate ListView and is a QtQuick.Controls Slider. It's possible to drag the ListView vertically on the heading label within the delegate, but the slider itself blocks all input from the ListView.

      How is it that the QtQuick.Controls Slider blocks the ListView? Does this suggest a workaround for handmade QML components?

      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
            paulmasri Paul
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes