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

QML TableView: resizableColumns/resizableRows breaks the default interactive behavior

    XMLWordPrintable

Details

    • 38b9d70cb (dev), e04050374 (6.6), ec395ccdd (6.5)

    Description

      By default, property interactive is true so that one can use mouse wheel to scroll. But the ability to interact using mouse wheel is somehow broken if either resizableColumns or resizableRows is set to true.

      A minimal reproducer adapted from documentation:

      import QtQuick
      import Qt.labs.qmlmodels
      import QtQuick.Controls
      import QtQuick.Window
      
      Window {
          width: 300
          height: 100
          visible: true
      
          TableView {
              anchors.fill: parent
              columnSpacing: 1
              rowSpacing: 1
              clip: true
      
              model: TableModel {
                  TableModelColumn { display: "name" }
                  TableModelColumn { display: "color" }
      
                  rows: [
                      {
                          "name": "cat",
                          "color": "black"
                      },
                      {
                          "name": "dog",
                          "color": "brown"
                      },
                      {
                          "name": "bird",
                          "color": "white"
                      }
                  ]
              }
      
              delegate: Rectangle {
                  implicitWidth: 100
                  implicitHeight: 50
                  border.width: 1
      
                  Text {
                      text: display
                      anchors.centerIn: parent
                  }
              }
              //resizableRows: true
          }
      }
      

      resizableRows is commented out by default. So a small Window pops up upon running, and one can scroll up and down to see more rows. Uncomment resizableRows and one will find that scrolling does not work anymore. The same issue is reproducible with resizableColumns too.

      And indeed no actual motion happens:

      movementStarted()

      is never emitted.

      Attachments

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

        Activity

          People

            jokarlss Jonas Karlsson
            luqiaochen Luqiao Chen
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes