I want to draw a filled ellipse in QT that will not change its size when scaling and exiting. At the moment, I have the following:
QPen pen = painter->pen(); pen.setCosmetic(true); pen.setWidth(5); painter->setPen(pen); QBrush brush = painter->brush(); brush.setStyle(Qt::SolidPattern); painter->setBrush(brush); painter->drawEllipse(p, 2, 2);
When I reduce the gap between the border and the fill, will appear. So it looks like 2 concentric circles. And when I increase the filling, it overflows the border, and the disk gets bigger and bigger. Any idea how to fix this? Thanks!
source share