title: How to set the multiple flags in QMainWindow?
body: <p>From here: <a href="http://doc.qt.io/qt-4.8/qt-widgets-windowflags-example.html" rel="nofollow noreferrer">http://doc.qt.io/qt-4.8/qt-widgets-windowflags-example.html</a></p>
  
  <pre><code> if (flags &amp; Qt::MSWindowsFixedSizeDialogHint)
       text += "\n| Qt::MSWindowsFixedSizeDialogHint";
   if (flags &amp; Qt::X11BypassWindowManagerHint)
       text += "\n| Qt::X11BypassWindowManagerHint";
   if (flags &amp; Qt::FramelessWindowHint)
       text += "\n| Qt::FramelessWindowHint";
   if (flags &amp; Qt::WindowTitleHint)
       text += "\n| Qt::WindowTitleHint";
   if (flags &amp; Qt::WindowSystemMenuHint)
       text += "\n| Qt::WindowSystemMenuHint";
   if (flags &amp; Qt::WindowMinimizeButtonHint)
       text += "\n| Qt::WindowMinimizeButtonHint";
   if (flags &amp; Qt::WindowMaximizeButtonHint)
       text += "\n| Qt::WindowMaximizeButtonHint";
   if (flags &amp; Qt::WindowCloseButtonHint)
       text += "\n| Qt::WindowCloseButtonHint";
   if (flags &amp; Qt::WindowContextHelpButtonHint)
       text += "\n| Qt::WindowContextHelpButtonHint";
   if (flags &amp; Qt::WindowShadeButtonHint)
       text += "\n| Qt::WindowShadeButtonHint";
   if (flags &amp; Qt::WindowStaysOnTopHint)
       text += "\n| Qt::WindowStaysOnTopHint";
   if (flags &amp; Qt::CustomizeWindowHint)
       text += "\n| Qt::CustomizeWindowHint";
  </code></pre>
  
  <p>But when I do this: </p>
  
  <pre><code>Qt :: WindowFlags flags = 0;
  
  flags = flags | Qt :: WindowStaysOnTopHint;
  flags = flags &amp; Qt :: WindowMinimizeButtonHint;
  window-&gt;setWindowFlags (flags);
  </code></pre>
  
  <p>The first flag gets overwritten. What is the way to set more than one flags at the same time?</p>