Painter.
setRenderHint(QPainter::Antialiasing,
true) ;
Painter.drawEllipse((circleX-(circleRadius)),(circleY-(circleRadius)),circleRadius*2,circleRadius*2); // Drawing the ellipse (giving same value for height and with)
Painter.drawLine(circleX,circleY,circleX+circleRadius,circleY); // Drawing the first line, starting from origin to its right side.
Painter.drawLine(circleX,circleY,circleX+(circleRadius*(qCos(angle*3.14/180.0))),circleY-(circleRadius*(qSin(angle*3.14/180.0)))); // Drawing second line. Starting from origin, the angle value with respect to first line is "angle"
QPainter Painter(this);
Painter.setRenderHint(QPainter::Antialiasing,true) ;
Painter.setPen(QPen(QColor(Qt::black)));
Painter.drawEllipse((circleX-(circleRadius)),(circleY-(circleRadius)),circleRadius*2,circleRadius*2); // Drawing the ellipse (giving same value for height and with)
Painter.setPen(QPen(QColor(Qt::black)));
Painter.drawLine(circleX,circleY,circleX+circleRadius,circleY); // Drawing the first line, starting from origin to its right side.
Painter.drawLine(circleX,circleY,circleX+(circleRadius*(qCos(angle*3.14/180.0))),circleY-(circleRadius*(qSin(angle*3.14/180.0)))); // Drawing second line. Starting from origin, the angle value with respect to first line is "angle"
To copy to clipboard, switch view to plain text mode
Bookmarks