Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.6.0, 5.12.9, 5.15.0
-
None
-
Win 7, MSVC 2013 64b
Description
In paintGL draw eg. circle dotline out off screen then next QPainter::setPen do not change color next drawing.
In this code rectangle is blue and line is red.
But expected rectangle and line to blue.
If circle is drawed on screen or if change Qt::DotLine to solid line everything is OK.
void MapView::paintGL()
{
QPainter p(this);
p.beginNativePainting();
glViewport(0, 0, width(), height());
glClearDepthf(1);
glClearColor(0,0,0,1);
glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glDisable(GL_DEPTH_TEST);
p.endNativePainting();
p.setPen(QPen(Qt::blue, 2));
p.drawLine(15, 15, 1000, 1000);
p.setPen(QPen(Qt::red, 1, Qt::DotLine));
p.drawEllipse(-50, -50, 10, 10);
p.setPen(QPen(Qt::blue, 4));
p.drawRect(15, 15, 1000, 1000);
}
In code.zip is modified example bubble overpainting. Try resize screen to view bug.
Attachments
Issue Links
- duplicates
-
QTBUG-35513 QPen::setStyle with Qt::DashLine corrupts rendering colors
-
- Closed
-