I have the following image,where the rectangle and the line overlap each other.I am creating the line by drawLine and rectangle by p.drawRect(QtCore.QRectF(tl, size)) .How to have control over the objects so that I can decide which one I want to see on top.In this case I want the line to to on top of the rectangle.How to do so?