I'm trying to export the contents of my QGraphicsScene to PNG. For some reason I have to maintain the scene's bounding rectangle myself.

Here's a sample export that should contain a purple ellipse and an orange rectangle on a transparent background:



Why is the exported image messed up like that? Are there any common symptoms that I should look for in my code?