Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Disabling QTableView leads to ScrollBar problems
Forum Update on Monday, May 27th 2025

Disabling QTableView leads to ScrollBar problems

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lukasf
    wrote on last edited by
    #1

    I am using QTableView with a custom QAbstractItemModel (Win + Qt 4.7.1).
    As soon as I disable the QTableView, the (vertical) QScrollBar is disabled as well - just as expected.

    When re-enabling the QTableView, the QScrollBar behaves in a very strange way. The slider as well as the contents of the table still appear to be at the same position. However, the slider is always at the very top even though it is painted at its original location. As a result, the slider can only be dragged if you click on the top area. Manually calling update, repaint and the like have no effect.

    @
    // start
    table_view->setEnabled(false);
    table_view->setEnabled(true);
    // re-enabled
    @

    Maybe this little sketch of the ScrollBar will help to visualize my problem:

    @
    . . X
    . . X
    . . X
    . . .
    X X .
    X => X .
    X X .
    . . .
    start re-enabled actual
    @
    Has anybody came across a similar problem? I have not been able to find a corresponding bug report.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      Sounds like something to report as a bug on "Jira":http://bugreports.qt.nokia.com

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved