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. Scrolling messes up QTableView's custom painting

Scrolling messes up QTableView's custom painting

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 727 Views 1 Watching
  • 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.
  • S Offline
    S Offline
    Schluchti
    wrote on last edited by
    #1

    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

    Want to read more about Qt?

    https://gympulsr.com/blog/qt/

    Latest Article: https://gympulsr.com/blog/qt/2017/06/14/ios-background-music-qt.html

    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