解决qt5窗口不刷新(测试窗口类型,测试窗口属性)

QApplication::notify


#if QT_VERSION >= 0x050000
        if (QEvent::Show == pEvent->type())
        {
            if (pObject->isWidgetType())
            {
                QWidget* pWidget = qobject_cast<QWidget*>(pObject);
                if ((NULL != pWidget) && !pWidget->testAttribute(Qt::WA_Mapped))
                {
                    pWidget->setAttribute(Qt::WA_Mapped);
                }
            }
        }
#endif

 

http://www.qtcn.org/bbs/apps.php?q=diary&a=detail&did=2240&uid=140408

posted @ 2016-09-28 16:06  findumars  Views(3779)  Comments(0Edit  收藏  举报