Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
6.8.0
-
None
-
windows 10, VS2022
Description
run QPainter::drawLine() on QWidget for multiple times, we set the pen width to 1, but some lines have the width 2.
This problem only exists in Qt 6 version, I tested it with Qt 5.15.2, no such problem.
test code:
void QWidgetMain::paintEvent(QPaintEvent*)
{
QPainter Painter(this);
QPen MyPen;
MyPen.setColor(QColor(250, 20, 20));
MyPen.setWidth(1);
Painter.setPen(MyPen);
for (int i = 0; i < width(); i += 3)
for (int i = 250; i < 400; i += 3)
}
Test result was uploaded to attachment.