Welcome to MSDN Blogs Sign in | Join | Help

How to make QT SDK work with VisualStudio 2008 (Express/Complete)

You can use the following steps to make QT SDK work with your Visual Studio 2008 (either express version or commercial version).
  • Download the QT SDK from http://www.qtsoftware.com/downloads/sdk-windows-cpp
  • If you do not have VisualStudio 2008 get it from http://www.microsoft.com/express/download/
  • Once QT and VisualStudio 2008 both are installed and ready, open the VisualStudio 2008 Command Prompt (from Microsoft Visual Studio 2008 | Visual Studio Tools menu of Program Files)
  • Change directory to the QT SDK installation folder in the Command Prompt. Usually it would be of the form "C:\Qt\2009.01\qt"
  • Execute the configure.exe by typing configure in the command prompt. This should start configuring the QT for VisualStudio 2008 and Windows. Let it complete.
  • Once the configuration is complete, build QT for use with Visualstudio 2008 by issuing the command nmake
  • Configuration and the following nmake will take some time. Once they are complete, your QT SDK will be ready for use with VisualStudio.
  • To let VisualStudio recognize the include and library files of QT, add their paths to the VisulStudio Tools|Options|Projects and Solutions|VC++ Directories section. Typically you would want to add C:\Qt\2009.01\qt\include to the Include, C:\Qt\2009.01\qt\lib to the libraries and C:\Qt\2009.01\qt\bin to the Executables sections.
  • Also you can add C:\Qt\2009.01\qt\bin to the Path System variable so that the QT dlls get probed correctly when loaded from your application. (You can use MyComputer|Properties|Advanced|Environment Variables)

Now your QT SDK is ready to be used with Visual Studio 2008. Go to Examples directory of your QT SDK installation (typically, C:\Qt\2009.01\qt\examples) and open the examples.sln file from your Visual Studio 2008. (If double-clicking the .sln file does not open automatically with Visual Studio, open it manually from within Visual Studio.

Build and run the tutorial1 project. If your Include, Library and Path System variable settings are correct, you should have the project output build and run successfully.

You can associate the .ui files to the QTDesigner by right clicking any .ui file in the solution explorer and selecting "Open With" option. In the Open With options dialog, click 'Add' button and select the designer.exe from the QTSDK bin directory (typically, it would be C:\Qt\2009.01\qt\bin\designer.exe). Click 'Set as Default' to let the QTDesigner handle the .ui files.

Published Monday, March 09, 2009 3:32 PM by P.Gopalakrishna
Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Click & Solve » How to make QT SDK work with VisualStudio 2008 (Express/Complete)

# re: How to make QT SDK work with VisualStudio 2008 (Express/Complete)

Is it possible to do this on Mac OSX

Friday, August 07, 2009 5:45 PM by Person who read it

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker