Qt绘图设备QPixmap
作者:互联网
Widget::Widget(QWidget *parent)
: QWidget(parent)
, ui(new Ui::Widget)
{
ui->setupUi(this);
/* 绘图设备 专门为平台做了显示的优化 */
QPixmap pixmap(300, 300);
pixmap.fill(Qt::lightGray);
QPainter painter(&pixmap);
painter.setPen(Qt::red);
painter.drawEllipse(QPoint(100, 100), 50, 50);
ui->label->setPixmap(pixmap);
}
标签:pixmap,Widget,Qt,ui,QWidget,绘图,QPixmap,painter 来源: https://www.cnblogs.com/zhangxuechao/p/16552546.html