Draw dashline of 1 px width and opaque
-
In paintevent(), I'm trying to draw horizontal Dash line of exactly 1 pixel width, but its being drawn 2 pixels wide and not opaque. Not sure what's going on.
QPen pen; pen.setColor(QColor::fromRgb(0, 0, 140)); pen.setStyle(Qt::PenStyle::DashLine); pen.setWidth(0); pen.setCosmetic(true);
Noticed another thing, seeing this issue when using drawLine, but when I use drawLines then the line width is 1px and color opaque.