When changing a pen's width the content's size changes (same sized red rectangle is shown for comparison). The content's size must remain the same.
1) Write tests to break it, fix each test to correct it. In all tests, the content must remain of the same size.
Put a reference QGraphicsRectItem and a QtRoundedRectItem in a QGraphicsView, both with 1x1 white pixels inside. Change the QGraphicsRectItem its pen width from 1 to 2.
Put a reference QGraphicsRectItem and a QtRoundedRectItem in a QGraphicsView, both with 1x1 white pixels inside. Change the QGraphicsRectItem its pen width from 2 to 1.
Put a reference QGraphicsRectItem and a QtRoundedRectItem in a QGraphicsView, both with 5x3 white pixels inside. The QtRoundedRectItem must have focus. Change the QtRoundedRectItem focus pen's width from 3 to 1. Lose focus. Change the QtRoundedRectItem contour/normal pen's width from 2 to 1.
When changing a pen's width the content's size changes (same sized red rectangle is shown for comparison). The content's size must remain the same.
1) Write tests to break it, fix each test to correct it. In all tests, the content must remain of the same size.
2) Fix the text 3) Check visually