title: Qt4.8.1 undhandled exception at QMdiArea::addSubwindow
body: <p>I compiled Qt 4.8.1 with these instructions:
  <a href="http://www.holoborodko.com/pavel/2011/02/01/how-to-compile-qt-4-7-with-visual-studio-2010/" rel="nofollow">http://www.holoborodko.com/pavel/2011/02/01/how-to-compile-qt-4-7-with-visual-studio-2010/</a></p>
  
  <p>for my system (Visual Studio 2010, x64). The compilation worked and everything seemed Ok.
  While compiling there is a lot of output, but it's very fast and therefore I can't read it so i suppose that shouldn't be a problem.</p>
  
  <p>After I compiled succesfully my current project I got an unhandled runtime exception. After a while I discovered that it comes from the <code>QMdiArea::addSubwindow</code> function, which seems to throw the exception (I'm not able to catch it with overriden notify function though). So I searched for an example project to see if it's my code or something else. I found this example here:
  <a href="http://www.codeprogress.com/cpp/libraries/qt/qMdiAreaAddSubWindow.php" rel="nofollow">http://www.codeprogress.com/cpp/libraries/qt/qMdiAreaAddSubWindow.php</a></p>
  
  <p>And it works fine in 32bit mode as well as debug mode of x64, but again at the
  <code>QMdiArea::addSubwindow</code> function there is an unhandled exception. Has anyone an idea what's wrong or had the same problem?</p>
  
  <p>Currently I'm recompiling Qt to get the debug information again (i cleaned it beforehand). </p>
  
  <p>But maybe someone had the same problem and a solution for me.</p>
  
  <p>//Update:
  The code is here (the exact same as in the link)</p>
  
  <pre><code>#include &lt;QApplication&gt;
  #include &lt;QMainWindow&gt;
  #include &lt;QMdiArea&gt;
  #include &lt;QMdiSubWindow&gt;
  
  int main(int argc, char **argv)
  {
      QApplication app(argc, argv);
  
      QMainWindow window;
      window.setFixedSize(800,600);
      window.setWindowTitle(QString::fromUtf8("My QMdiWindow"));
      QMdiArea* area = new QMdiArea();
      area-&gt;setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
  
      //Create QMdiSubWindow
      QMdiSubWindow* subWindow = new QMdiSubWindow();
      subWindow-&gt;setFixedSize(200,100); 
  
      //Add subWindow to Main QMdiWindow here
      area-&gt;addSubWindow(subWindow);
  
      window.setCentralWidget(area);
      window.show();
  
  
      return app.exec();
  }
  </code></pre>
  
  <p>//Update2:
  I opened another discussion <a href="http://qt-project.org/forums/viewthread/18819/" rel="nofollow">here</a>.</p>