title: Why QResizeEvent & QWidget::size gives different when fullscreen?
body: <p>The question is from <a href="https://stackoverflow.com/a/52151020/3308570">https://stackoverflow.com/a/52151020/3308570</a>.
  (contains an example to reproduce the problem)</p>
  
  <p>I'm trying to get the widget size when it shows fullscreen. At first, I took the size from <code>QResizeEvent::size</code>. But the size only works correctly once. Like:</p>
  
  <ol>
  <li>show fullscreen</li>
  <li>QResizeEvent::size ⇒ <code>1920x1080</code></li>
  <li>show normal</li>
  <li>QResizeEvent::size ⇒ <code>500x400</code></li>
  <li>show fullscreen</li>
  <li>QResizeEvent::size ⇒ <code>516x439</code></li>
  </ol>
  
  <p>Then I changed to using <code>QWidget::size</code> in <code>QResizeEvent</code>, it gives the correct result <code>1920x1080</code> always when fullscreen.</p>
  
  <p>Is this a bug, or I did something wrong?</p>
  
  <p>Env: Qt 5.10.1 Mingw32 Win10</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I found the problem because the <code>videoWidget</code> show incorrect size. Then I check the size by debugging.</p>
  
  <p>Thanks @Scheff ,I replaced the <code>resizeEvent</code> function part to observe the problem:</p>
  
  <pre><code>ushort i = 0;
  void resizeEvent(QResizeEvent* event) {
      i++;
      const QSize sizeEventOld = event-&gt;oldSize();
      const QSize sizeEvent = event-&gt;size();
      const QSize sizeWidgetBefore = size();
      const QSize sizeWidgetAfter = size();
      qDebug() &lt;&lt; "Widget::resizeEvent():" &lt;&lt; i;
      qDebug() &lt;&lt; "QResizeEvent::oldSize  :" &lt;&lt; sizeEventOld;
      qDebug() &lt;&lt; "QResizeEvent::size     :" &lt;&lt; sizeEvent;
      qDebug() &lt;&lt; "Widget::size() (before):" &lt;&lt; sizeWidgetBefore;
      qDebug() &lt;&lt; "Widget::size() (after) :" &lt;&lt; sizeWidgetAfter;
      videoWidget-&gt;resize(size());
      event-&gt;accept();
  }
  </code></pre>
  
  <p><strong>Mingw32, MSVC2013 Output:</strong></p>
  
  <pre><code>Widget::resizeEvent(): 1 // The window initilized
  QResizeEvent::oldSize  : QSize(-1, -1)
  QResizeEvent::size     : QSize(500, 400)
  Widget::size() (before): QSize(500, 400)
  Widget::size() (after) : QSize(500, 400)
  Widget::resizeEvent(): 2 // Double click, show fullscreen.
  QResizeEvent::oldSize  : QSize(500, 400)
  QResizeEvent::size     : QSize(1920, 1080)
  Widget::size() (before): QSize(1920, 1080)
  Widget::size() (after) : QSize(1920, 1080)
  Widget::resizeEvent(): 3 // Double click, show normal.
  QResizeEvent::oldSize  : QSize(1920, 1080)
  QResizeEvent::size     : QSize(500, 400)
  Widget::size() (before): QSize(500, 400)
  Widget::size() (after) : QSize(500, 400)
  Widget::resizeEvent(): 4 // Double click, show fullscreen(2nd time)
  QResizeEvent::oldSize  : QSize(500, 400)
  QResizeEvent::size     : QSize(516, 439)
  Widget::size() (before): QSize(1920, 1080)
  Widget::size() (after) : QSize(1920, 1080)
  Widget::resizeEvent(): 5 // Double click, show normal(2nd time)
  QResizeEvent::oldSize  : QSize(1920, 1080)
  QResizeEvent::size     : QSize(500, 400)
  Widget::size() (before): QSize(500, 400)
  Widget::size() (after) : QSize(500, 400)
  </code></pre>