spuds
29th May 2008, 04:01
I am following the examples in Chapter 7 of Johan Thelin's book "Foundations of Qt Development". Simply put, I am creating a QQraphicsRectItem that is added to a QGraphicsScene as part of a QGraphicsView. I can then interact with the RectItem through handles that are also detailed in Chapter 7 of that book. All works fine, except large scaling. The rectangle expands and contracts appropriately but so does the line width of the border of the rectangle and any fill pattern is also scaled. With a pen width set to 1, a large horizontal drag expanding the width of the rectangle also results in the two side borders getting expanded to an apparent pen width of like 3 to 4. My question is whether I can change the size of the rectangle while keeping the pen width at 1 or whatever size I choose?