0

I have a ray tracer that uses QImage to save the rendered image to a file. It does not use any other Qt classes. I can do this without using Visual Studio (I did this in linux), but now I would like to be edit the program using VS (I have VS2010).

What's the easiest way to do this? I assume that if I just do:

#include <QImage>
....
QImage image..... 

it's not going to work. How do I tell VS to use Qt in the project as well?

I've looked at this but the gives an error in my VS... If anyone has an updated guide for VS2010 and add-in 1.1.8, that would be great!


Edit: Since I wasn't clear enough, I already have Qt and the plug-in for VS. I need some guidance as to how to edit the .vsproj file so that Qt classes are linked in the project after the creation of a normal C++ project.

Community
  • 1
  • 1
confusedKid
  • 3,231
  • 6
  • 30
  • 49

1 Answers1

0

You basically want to install Qt for Visual Studio. Have you seen this short guide?

Qt requires its own special pre-compilation stage; that's what qmake, the project file and the meta-object compiler are all about. That's why it's slightly (only slightly) more involved that just putting the header directory on the path and linking to the object binaries.

If you were considering using QImage in an existing project, I would say rather find a Windows-native image library, since it's not worth altering your whole toolchain (especially if you aren't really benefiting from the pre-compilation stage), but it sounds like you really want just to cross-compile your Qt project. Have you considered QtCreator?

Here is an actual plugin for VC++

rohannes
  • 406
  • 3
  • 11
  • I already have Qt for VS. Sorry if it wasn't clear... (I guess I only hinted at it with the link I provided). Basically I want to turn a normal VS project into one that uses Qt elements (namely QImage). – confusedKid Apr 12 '11 at 02:39