title: How to addSubWindow to a QMdiArea (set to TAB mode) without taking the focus from the currently active Tab?
body: <p>I have a function that runs in the background and adds tabs in a <code>QMdiArea</code>. However, when a new tab is added it steals the focus from the currently active tab. Is there a way I can add a new inactive tab (sub window), so I keep the focus to the currently used tab?</p>
  
  <p>I have searched the web but was not able to find anything related to this issue.</p>
  
  <p>I have tried the following:</p>
  
  <pre><code>MyWidget *widget=new MyWidget();
  QMdiSubWindow *sub=ui-&gt;mdiArea-&gt;addSubWindow(widget,Qt::SubWindow);
  sub-&gt;setWindowState(Qt::WindowNoState);
  </code></pre>
  
  <p>but it does not have the desired effect.</p>