title: Compiling Qt - Visual Studio 2010
body: <p><strong>I am looking for any tutorials or information on compiling Qt 4.7 with Visual Studio 2010.</strong></p>
  
  <p>I've recently have run into an bug using Qt 4.7.1 libraries on Visual Studio 2010 and have found information that recompiling Qt with 2010 can potentially solve it. <strong><em>Edit</strong>: This has solved the issue.</em></p>
  
  <p>Ref: <a href="http://www.qtforum.org/article/34406/heap-corruption-caused-by-calling-selectedindexes-method-of-qitemselectionmodel-class.html" rel="nofollow">http://www.qtforum.org/article/34406/heap-corruption-caused-by-calling-selectedindexes-method-of-qitemselectionmodel-class.html</a></p>
  
  <p>After Researching for awhile, I was successfully able to compile Qt in VS2010 using the following:</p>
  
  <p><strong>Compile:</strong></p>
  
  <ol>
  <li>set QMAKESPEC=win32-msvc2010</li>
  <li>configure -platform win32-msvc2010</li>
  <li>nmake</li>
  </ol>
  
  <p><strong>Integration to VS2010:</strong> </p>
  
  <ol>
  <li>Download Visual Studio Qt add-in and install</li>
  <li>Select from menu: Qt/Configure Qt Versions.</li>
  <li>Add new version to point to compiled binaries</li>
  <li>Restart Visual studio and rebuild
  projects.</li>
  </ol>
  
  <p>Hope this helps others...</p>
  
  <p><strong>Further Refs:</strong></p>
  
  <p><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> 
  <a href="http://blog.paulnettleship.com/2010/11/11/troubleshooting-visual-studio-2010-and-qt-4-7-integration/" rel="nofollow">http://blog.paulnettleship.com/2010/11/11/troubleshooting-visual-studio-2010-and-qt-4-7-integration/</a>
  <a href="http://dcsoft.wordpress.com/2010/01/30/how-to-setup-qt-4-5-visual-studio-integration/" rel="nofollow">http://dcsoft.wordpress.com/2010/01/30/how-to-setup-qt-4-5-visual-studio-integration/</a></p>
  
  <p><em>Note: recompiling for VS2010 fixed bug experienced above.</em></p>