Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.2.1
-
None
-
Windows 7 32- and 64-bit.
Description
A custom dash pattern (QPen::setDashPattern) with pen width 1 is not rendered correctly. The dash and space length are supposed to be rendered relative to the pen width, but with pen width 1 it appears Qt is computing the number of pixels to paint, and using this number regardless of the angle of the dashed line. For example, a dash at 45 degrees has length equal to projection on x or y axis multiplied by sqrt(2). The length should be consistent regardless of angle.
There is a workaround to adjust the lengths if the pen width is 1.
This problem appeared when we transitioned from Qt4.6.1 to Qt5.2.1.