当窗体设置framelesswindowhint后, this->setWindowFlags(Qt::FramelessWindowHint);
窗体就变得不会刷新了...比如点击按钮改变按钮的文字, 其他子窗体嵌在主窗体中实时刷新的功能.
解决方法
重写showEvent
void showEvent(QShowEvent *event) {
this->setAttribute(Qt::WA_Mapped);
QWidget::showEvent(event);
}
参考引用 点击打开链接