Disabling QTableView leads to ScrollBar problems



  • 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.



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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.