SOLVED: Pattern BrushStyle drawn “spotty” or incomplete
I am using the Qt::VerPattern when painting rectangles. Sometimes, they look fine, but often, they are spotty, incomplete or altogether missing.
The area encircled in red contains 11 rectangles, some drawn with a solid pattern, some with a VerPattern.
This is not an issue of the rectangles being too small for the pattern to paint properly – I’ve been through this before, and knew I had to look for it.
Also, rectangles painted with the solid pattern are always correct. Therefore, the issue lies with the pattern, not the rectangle coordinates.
When you consider the rectangle right below the text “09:50:10”, it’s a single rectangle, but as you see, there are vertical lines missing.
The brush I use is
The rectangle I paint is
- QRectF(31672,3 4312x14)
(Note: I am using a transformation on the x-axis. The x-coordinates are given in milliseconds from the left edge of the display. You can check the width of the rectangle of 4312 ms against the scale displayed above, and the width matches).
Any ideas what’s wrong here?