title: QGuiApplication::commitDataRequest: QML window is not painted
body: <p>I'm trying to add quit confirmation message at OS shutdown according to this example:
  <a href="https://doc.qt.io/qt-5/qsessionmanager.html#allowsInteraction" rel="nofollow noreferrer">https://doc.qt.io/qt-5/qsessionmanager.html#allowsInteraction</a></p>
  <p>I interact with the user via QML interface. It is asynchronous, so I use slots/signals. And I use additional QEventLoop to stay inside of QGuiApplication::commitDataRequest call while interacting with the user.</p>
  <p>The trouble is that after I shutdown OS (Windows 10) - my app prevents OS to shutdown and it's good, but its screen is just white, or contains old state without the confirmation dialog. I need to hide/restore window or change its size, or do some mouse clicks inside of it to force it repaint. When it repaint all is OK and my confirmation dialog is there.</p>
  <p>Is this a bug? Is there a workaround?</p>
  <p>This is the code I use:</p>
  <pre><code>void AppQuitConfirmationAtOsShutdownManager::onCommitDataRequest(
          QSessionManager &amp;m)
  
  {   
      if (!m_ui-&gt;isConfirmationRequired())
          return;
  
      if (!m.allowsInteraction())
          return;
  
      bool isConfirmed = true;
  
      QEventLoop loop;
  
      qtconnect(m_ui.data(), &amp;AppQuitConfirmationUiManager::confirmationResult,
                &amp;loop, [&amp;](bool confirmed)
      {
          isConfirmed = confirmed;
          loop.quit();
      },
      Qt::QueuedConnection);
  
      m_ui-&gt;requestConfirmation();
  
      loop.exec();
  
      m.release();
  
      if (!isConfirmed)
          m.cancel();
  }
  </code></pre>