Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
6.5.5-1
-
None
Description
issue 1
qreal pd = p * width(); // Calculate the width of the progress bar QPainter painter(this); painter.setRenderHint(QPainter::Antialiasing); QPen pen(Qt::green, 15, Qt::CustomDashLine, Qt::SquareCap, Qt::MiterJoin); pen.setDashOffset(0); pen.setDashPattern({1,1}); painter.setPen(pen); painter.drawLine(0, height()/2 , pd, height()/2 );
I have created a Qwidget with width() = 120 in the ui fiile, and i want to set a width for the dash and maintain same length with the dash and space ({1,1}). However, it is found that they are not appeared as expected. They didnt keep the same length of dash and space. (Capture.PNG)
issue 2
qreal pd = p * width(); // Calculate the width of the progress bar QPainter painter(this); painter.setRenderHint(QPainter::Antialiasing); // QPen pen(Qt::green, 15, Qt::CustomDashLine, Qt::SquareCap, Qt::MiterJoin); QPen pen; pen.setColor(QColor("#00cc00")); pen.setDashOffset(0); pen.setWidth(15); pen.setDashPattern({1,2}); painter.setPen(pen); painter.drawLine(0, height()/2 , pd, height()/2 );
And if i try to set the width and fine tune the value of setDashPattern, even if the space value is larger than the dash value, it does keep their length correct (Capture2.PNG)
issue 3
it is weird that the first dash is smaller than the second dash.