title: How to redirect qDebug, qWarning, qCritical etc output?
body: <p>I'm using a lot of <code>qDebug() &lt;&lt;</code> statements for debug output. Is there any cross-platform way I can redirect that debug output to a file, without resorting to shell scripts? I'm guessing that <a href="http://opennet.ru/man.shtml?topic=open&amp;category=2&amp;russian=0" rel="noreferrer">open()</a> and <a href="http://opennet.ru/man.shtml?topic=dup2&amp;category=2&amp;russian=0" rel="noreferrer">dup2()</a> will do the job in Linux, but will it work compiled with MinGW in Windows?</p>
  
  <p>And maybe there is a Qt way to do it?</p>