- 
    
Bug
 - 
    Resolution: Duplicate
 - 
    
P3: Somewhat important
 - 
    5.12.4
 - 
    None
 
We moved project from 5.7.x to 5.12.4 and face the issue with QDialog.
When QDialog is closed and we execute QDialog::exec second time the QEvent::Paint is not called. When you close Dialog using Escape key or with custom button it works properly.
When you resize window or call QWidget::repaint the QEvent::Paint is called but in more complicated views it bombards you with asserts.

I have found workaround to override close event (which also prevent asserts):
    void closeEvent(QCloseEvent* bar) override
      {
      bar->ignore();
      hide();
      }
In attachment you can find test project.
- duplicates
 - 
                    
QTBUG-77350 QWidget does not handle spontaneous QPlatformWindow creation or destruction
-         
 - Closed
 
 -