koan
25th March 2011, 11:11
Hi,
I have a QGraphicsView in which I view a scaled QGraphicsScene. I am adding a rectangle with a cosmetic pen, however, the width of the rectangle outline is more than 1 pixel.
Before, during and after drawing I checked that the width of the pen is zero. So it should be always drawn with an onscreen width of 1 pixel, right ?
If my application receives a resizeEvent, the layout resizes the view; drawing rectangles with the same code results in cosmetic pen being applied.
Any suggestions gratefully received.
I have a QGraphicsView in which I view a scaled QGraphicsScene. I am adding a rectangle with a cosmetic pen, however, the width of the rectangle outline is more than 1 pixel.
Before, during and after drawing I checked that the width of the pen is zero. So it should be always drawn with an onscreen width of 1 pixel, right ?
If my application receives a resizeEvent, the layout resizes the view; drawing rectangles with the same code results in cosmetic pen being applied.
Any suggestions gratefully received.