We'd have to see the bigger picture. It is likely you are drawing outside boundingRects of your items or something like that.
We'd have to see the bigger picture. It is likely you are drawing outside boundingRects of your items or something like that.
Hmm,
I tried self.view.fitInView(self.scene.itemsBoundingRect() ,Qt.KeepAspectRatio) but it also didn't work.
I don't know if you'd mind looking at the big picture but here is the complete code:
(unfortunately I'm using some other lib for data import. The Scene/View and MainWindow implementations are at the bottom. Top classes are not important)
http://pastebin.com/m264f6728
It would be best to isolate the problem using a minimal compilable example.
Oopps, I'm a bit dizzy late at night. I've produced a minimal example and figured out that the problem is with the line:
Qt Code:
To copy to clipboard, switch view to plain text mode
Removing it solved the problem. I just tought it could speed up the performance of drawing grid.
Thank you for your help.
Bookmarks