Originally Posted by
aj2903
Can some help me regarding QBitmap class.
Is is possible to create new .bmp file using Qt. ?Can someone give me snippet of the code ?
Try something like this.
void paint_a_bitmap()
{
p.setPen(Qt::red);
p.drawText(200,200,"Qt Painting");
//DO SOME PAINTING HERE
bmp.save("test.bmp");
};
void paint_a_bitmap()
{
QPixmap bmp(500,500);
QPainter p(&bmp);
p.setPen(Qt::red);
p.drawText(200,200,"Qt Painting");
//DO SOME PAINTING HERE
bmp.save("test.bmp");
};
To copy to clipboard, switch view to plain text mode
Bookmarks