views:

516

answers:

3

I downloaded the latest open source version of QT4-and its installed in c:\qt\2009.04. I've also downloaded the QT4 Visual Studio add-in 1.1.0. I want to set it up for both Visual Studio 2005 and Visual Studio 2008 . Most of the docs online are for older versions. What steps do I follow?

+1  A: 

Have you tried Qt 4.5 with Visual Studio 2008 (VC++ Express) HowTo?

Karl Voigtland
Thanks for the link....this looks to be for the newer version. How do I make it for both VS 2005 and VS 2008?
iceman
+1  A: 

Current docs are at link text. However, most for most of the basics, any QT4.x documentation will lead you in the right direction. Do use their demo programs. They are really, really good at showing how to do things. I've built a few applications using them as a starting point.

The integration with VS is via Visual Studio Add-IN. Installs like any other plug in. Couple of things to watch out for -

  1. If you want to use their integration, you have to create project as a QT project. Add a QT based class to an existing project works fine as long as you don't use any events.
  2. DO NOT CHANGE their default directory structure for QT projects. If you do, their pre-compilers to generate event handling code will not work unless you are really good at editing project files.

Good Luck, I really liked programming in it (back to c#). Especially their new graphics/animation code. If you now .NET programming, most of the concepts are the same in QT, just different syntax.

photo_tom
I followed the link Karl mentioned. Unfortunately, after nmake I got a link error and the build stopped after after 2 hours and I'm trying to fix it. Configure and nmake takes time. Is there a way to get pre-built binaries ??
iceman
Have you looked in bin directory? That is where they are. Debug versions end in "...d.dll"
photo_tom
oh yeah...thanks
iceman
A: 

These are the steps I followed to get it running in VS2005 and it has been working always for me...

  1. Get the version you want from ftp://ftp.qt.nokia.com/qt/source/
  2. Extract it to any of your drives. One thing to note is to extract it to a location which has no spaces... (moc sometimes has a problem handling this...) (e.g: "c:\drive\qt\4.5.x" is ok. but "c:\drive qt 4.5.x" is not ok)
  3. Open cmd prompt and run "VS Installation Path\VC\vcvarsall.bat" or open your "VS cmd" prompt.
  4. Go to c:\drive\qt\4.5.x
  5. Run configure.exe (say yes to everything..)
  6. Run nmake
kriskarth