qt应用程序界面控件刷新不及时问题

可尝试以下方法:
1void showEvent(QShowEvent *event)
{
    
    
    this->setAttribute(Qt::WA_Mapped);
    QWidget::showEvent(event);
}
2、界面控件切换前调用:
show();
qApp->processEvents();
3update()
4adjustSize();
5resize(size());

猜你喜欢

转载自blog.csdn.net/qq_45662588/article/details/120611440
今日推荐