QT界面更新問題的解決方案

方案一:

設置定時器:定時update、repaint或者adjustSize。

參考:https://blog.csdn.net/xiezhongyuan07/article/details/79924902

方案二(推薦):

重寫showEvent函數

void showEvent(QShowEvent *e)
{
    this->setAttribute(Qt::WA_Mapped);
    QWidget::showEvent(e);
} 

參考:https://blog.csdn.net/jiedesheng/article/details/79481496

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章