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?
Have you tried Qt 4.5 with Visual Studio 2008 (VC++ Express) HowTo?
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 -
- 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.
- 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.
These are the steps I followed to get it running in VS2005 and it has been working always for me...
- Get the version you want from ftp://ftp.qt.nokia.com/qt/source/
- 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)
- Open cmd prompt and run "VS Installation Path\VC\vcvarsall.bat" or open your "VS cmd" prompt.
- Go to c:\drive\qt\4.5.x
- Run configure.exe (say yes to everything..)
- Run nmake