title: Drawing errors and crash with QWidget::createWindowContainer
body: <p>In my Qt 5.3 application, I want to integrate the GUI from a child process into my main process' window:</p>
  
  <ol>
  <li>The child process creates a top-level <code>QWidget</code>.</li>
  <li>The child process communicates the widget's <code>WId</code> as returned from <code>QWidget::winId()</code> to the parent (using IPC).</li>
  <li>The parent uses <code>QWindow::fromWinId()</code> and <code>QWidget::createWindowContainer()</code> to create a <code>QWidget</code> displaying the child process' GUI.  This widget is embedded into another widget's layout.</li>
  </ol>
  
  <p>Observations:</p>
  
  <ol>
  <li>The child GUI is displayed but not rendered correctly: there are white borders that don't get updated properly when re-sizing the parent.</li>
  <li>If the parent window is resized too small, the child process crashes due to an memory access violation within Qt's code.</li>
  <li>If I don't specify a parent with <code>QWidget::createWindowContainer()</code> to use a separate top-level window instead, the child is embedded just fine.</li>
  <li>After the child opens a modal dialog, such as <code>QMessageBox</code>, the issue fixes itself, and the child is embedded correctly after the next resize of the parent.</li>
  </ol>
  
  <p>Especially the last point puzzles me. I tried to find out if running the <code>QMessageBox</code> changes some flags on the child widget and if I can simulate these changes manually to work around the issue, without luck.</p>
  
  <p>Does anyone have an idea what is happening here?  What could the modal dialog possibly do to the widget that fixes the problem?</p>