9
votes

Code for the beginning:

QColor yellow("#f0d048");
Qt::BrushStyle style = Qt::SolidPattern;
QBrush brush(yellow, style);
painter.setBrush(brush);
painter.drawEllipse(10,10,10,10);

Everytime I do this, I get a yellow circle surrounded by a black 1-pixel-sized border. In total the circle will have the same size like if I draw with black colour, so what shall I do to just get a single-coloured yellow circle without black border?

Best regards

1

1 Answers

19
votes

Set a pen on painter

painter.setPen(Qt::NoPen);

Qt has 'brush' for filling figures, and 'pen' for drawing lines and outlines.