Hi,
I've tried this code in the constructor of a simple program.
qPainter.setBrush(Qt::NoBrush);
qPainter.setPen(Qt::red);
qPainter.drawRect(150,150,50,50);
bool bEnd = qPainter.end();
qImage.save("b.bmp");
QImage qImage("a.bmp");
QPainter qPainter(&qImage);
qPainter.setBrush(Qt::NoBrush);
qPainter.setPen(Qt::red);
qPainter.drawRect(150,150,50,50);
bool bEnd = qPainter.end();
qImage.save("b.bmp");
To copy to clipboard, switch view to plain text mode
With this I'll get the image "b.bmp" that is the same as "a.bmp" but with a red rectangle painted on position (150px,150px) with a widht and height of 50px.
This don't work as "b.bmp" is identical as "a.bmp"
Thanks,
Bookmarks