title: Maximize and minimize buttons in an undocked QDockWidget
body: <p>I´ve been trying to add the buttons to an undocked QDockWidget window as I normally do for a QDialog, but with no success as follows:</p>
  
  <pre><code>QDockWidget* dw = new QDockWidget(QString("Stream %1").arg(i + 1), this); 
  dw-&gt;setWindowFlags((dw-&gt;windowFlags() | Qt::WindowMaximizeButtonHint |
      Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint));
  </code></pre>
  
  <p>When I undock them they still only have the [X] close button.</p>
  
  <p>What am I missing?</p>
  
  <p><strong>Development environment info:</strong>
  Windows 10 x64,
  Visual Studio 2015,
  Qt 5.7.1,
  C++</p>