Scrolling messes up QTableView's custom painting



  • Hi,

    I subclassed QTableView and re-implemented the paintEvent() to do custom painting on my table. This all works really well, until I do some scrolling with the horizontal scrollbar which corresponds to the QTableView.

    If I scroll to the right, everything goes as planned. However, if I scroll to the left my custom painting somehow gets messed up. I did a little video (just a few seconds long ;-) ) to show you the effect.

    To see what's going on, I recommend you to watch the video in fullscreen.

    http://youtu.be/Zl4xpDaACWI

    My workaround for this problem (also seen in the video) is to re-paint the viewport after the horizontal scrollbar value changes. However, instead of using a dirty workaround, I would really be interested in what's causing the problem.

    I know, that I am using Python instead of C++, but I don't think that the python-wrapper classes are causing the problem.

    Do you guys have an idea?

    Kind Regards
    Bernhard


Log in to reply
 

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