Qt Snippet: Draw into QPixmap

QPixmap MyPixamp(QSize(32,32)); QPainter Painter; Painter.begin(&MyPixamp); // Here paint inside QPixmap Painter.setPen(QPen(QBrush(Qt::red), 1, Qt::DashLine)); Painter.drawRect(0,0,32,32); // ... Painter.end();
QPixmap MyPixamp(QSize(32,32)); QPainter Painter; Painter.begin(&MyPixamp); // Here paint inside QPixmap Painter.setPen(QPen(QBrush(Qt::red), 1, Qt::DashLine)); Painter.drawRect(0,0,32,32); // ... Painter.end();
Comments
Post a Comment