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

TableView resizableColumns = true disables touchpad scrolling

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.5.0 Beta3
    • Quick: Controls 2
    • None
    • Windows

    Description

      Hi everyone,

      I've been trying out the new "resizableColumns" functionality of TableView in Qt 6.5.

      I previously had some quite hacky code to handle column resizing, so this is a great addition for me. TableView API is looking great!

      I did manage to find an issue: on my laptop, using Qt 6.5.0-beta3 on Windows 10, Lenovo Thinkpad with a trackpad, scrolling the TableView is disabled if resizableColumns is set to true. There is no reaction to the 2 finger scroll gesture at all, either in horizontal or vertical directions. 

      Mouse scrolling does not work either.

      A workaround for me was to only enable resizableColumns on the HorizontalHeaderView, which then syncs with the TableView. This is an acceptable compromise for me, but I still think this is a bug. Would be nice to be able to scroll on the HorizontalHeaderView as well

      Reproduceable example (but really anytime you enable the property it disables scrolling using touchpad):

       

      import QtQuick
      import QtQuick.Window
      import QtQuick.Controls
      import Qt.labs.qmlmodels
      Window {
          width: 800
          height: 600
          visible: true
          TableView {
              anchors.fill: parent
              // If set to true, one cannot use touchpad 2 finger scrolling to scroll.
              // Both vertically or horizontally
              resizableColumns: true
              model: TableModel {
                  id: tableModel
                  TableModelColumn { display: "col1" }
                  TableModelColumn { display: "col2" }
                  TableModelColumn { display: "col3" }
                  // Just to add some rows with content
                  Component.onCompleted: {
                      for (var i = 0; i < 1000; i++) {
                          appendRow({ col1: Math.random(), col2: Math.random(), col3: Math.random() })
                      }
                  }
              }
              delegate: Text { text: display }
          }
      }
      
      
      

       

      Thanks in advance.

      • James

      Attachments

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

        Activity

          People

            richard Richard Moe Gustavsen
            james2048 James Crisafulli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes