I am modifying an existing custom round progress bar qt widget.
I currently have the following, As you can see i have a curved line with custom dash strokes, So there are 4 gaps total. However, how can i set a initial dash stroke to this?
Basically, I just want 1 more gap at the start, Heres the code for drawing the line:
line_painter = QPainter(self)
line_painter.setRenderHint(QPainter.Antialiasing)
pen = QPen()
pen.setStyle(Qt.CustomDashLine)
# Set the dash pattern. Now how do i set a initial dash pattern?
pen.setDashPattern([self.rpb_split_length, self.rpb_split_gap])
pen.setWidth(self.rpb_lineWidth)
pen.setBrush(QColor(self.rpb_lineColor[0], self.rpb_lineColor[1], self.rpb_lineColor[2]))
pen.setCapStyle(Qt.RoundCap if self.rpb_rounded else Qt.SquareCap)
pen.setJoinStyle(Qt.RoundJoin)
line_painter.setPen(pen)
line_painter.drawArc(int(self.rpb_positionX + self.rpb_posFactor), int(self.rpb_positionY + self.rpb_posFactor),
self.rpb_Size - self.rpb_sizeFactor, self.rpb_Size - self.rpb_sizeFactor,
START_POS_DICT[self.rpb_startPosition],
int(self.rpb_value))
line_painter.end()