Hi there.
My main window has the following draw-function:
void MainWindow::paintEvent(QPaintEvent*)
{
QImage sign(50, 50, QImage::Format_ARGB32_Premultiplied);
QPainter p(&sign);
p.setRenderHint(QPainter::Antialiasing, true);
p.fillRect(sign.rect(), QColor(255, 255, 255, 0));
p.setBrush(Qt::blue);
p.setPen(Qt::NoPen);
p.drawEllipse(0, 0, sign.width(), sign.height());
p.end();
QPainter painter(this);
painter.drawImage(rect(), sign, sign.rect());
}
So basically, it draws a blue filled circle onto a QImage and than draws that QImage onto the widget. However, when I resize the window, I get weird artefacts (in the upper left corner). This is what it looks like:
original:
after changing the window size:
Does anyone have an idea why this is?
(I'm working under Ubuntu 10.04, if that's of interest)