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

Hidden column causes position problem with new TableView

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Invalid
    • Affects Version/s: 5.15.0
    • Fix Version/s: None
    • Labels:
      None
    • Platform/s:
      Linux/X11, macOS, Windows

      Description

      I tried to use the new TableView from the QtQuick 2 Module. I used a custom column header which follows only horizontal scrolling. Additionally I defined a hidden column by returning 0 in the columnWidthProvider. Then I filled the table model with 100 columns and 100 rows.

      After some testing I noticed that fast horizontal scrolling leads to a misaligned column header. When I printed the contentX property of the TableView it was 100 pixel too large, which fits the hidden column width. Scrolling back slowing to the left the contentX property is still 100 pixel to large, it is 101 instead of 1. If I scroll fast to the left, by overshooting the mouse cursor out of the window, then it corrects itself again.

      So scrolling too fast by overshooting the mouse cursor to the right, leads to incorrect contentX position, but fixes it by overshooting to the left.

      I don't know how to workaround this, so filled this issue here.

      The example code can be tested with the qmlscene program.

      I only tried Qt 5.15.0 and 5.15.1.

        Attachments

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

          Activity

            People

            Assignee:
            richard Richard Moe Gustavsen
            Reporter:
            voodoo66 Voodoo Master
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes