[SOLVED]draw a rectangle with high-quality sides render in a QGraphicsScene
-
Hi,
The minimum pen width that can be set to a QPainter is 1 !!!
This make the shape lines somewhat fuzzy : If the color of the shape is black you will see a gray color and a thick line !!!
is There any solution to make the pen dark and thin (like the selection rectangle sides in the KDE desktop for example) ?thanks !
-
The greyish colour you may see could be due to antialiasing filters.
The pen width refers to the amount of pixels that will be affected in the same line, so 1 is the minimum (a pixel amount like 20.5 or 10.23 does not make sense).
Another thing that comes to my mind is that the thinnest unbroken line is where the y coordinates of the starting and ending point are the same (in case of a horizontal line) or the x coordinates are the same (in case of a vertical line).
I trust that you are applying the QBrush to the QRect object correctly, so I'll not comment on that :P