标签:pre 显示 asi edr use 重写 nop anti rect
重写 paintEvent :
Q_UNUSED(event)
QPainter p(this);
p.setPen(Qt::NoPen);
p.setBrush(QBrush(QColor(0, 0, 0, 180)));
p.setRenderHint(QPainter::Antialiasing);
p.drawRoundedRect(0, 0, width() - 1, height() - 1, 20, 20);
noPen 就不会有边框的黑色点点了,还阔以 ~
另外,子窗口居中显示:
cicle->move(this->width() / 2 - cicle->width() / 2, this->height() / 2 - cicle->height() / 2);
笨办法,行之有效 ~
标签:pre 显示 asi edr use 重写 nop anti rect
原文地址:https://www.cnblogs.com/hbrw/p/10289019.html