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);
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/278957.html