0

This is a spin off from another question I have on here right now.

Long story short is that I have Nokia's QT SDK downloaded (as well as the Visual Studio plug-in) and I was wondering what would be the best way to integrate some small QT functionality into a preexisting C++ Visual Studio project.

I realize that this probably amounts to a library directory or something along those lines, but I've been fiddling with this for a couple of days and can't get it figured out.

Context.

Community
  • 1
  • 1
Ryan
  • 3,127
  • 6
  • 32
  • 48

2 Answers2

4

The QT Visual Studio add-in allows you to create a fresh QT-enabled Visual Studio project, but it doesn't provide functionality for converting a vanilla VS project to a QT enabled one.

But you can do this manually by editing the vcproj file - I recently blogged about it here. Note that I wrote that for VS2008/Add-In 1.1.5 as I was an idiot and didn't check for a newer version of the add-in. But after trying 1.1.7, it appears that it has the same problem and that the same solution still works.

asdfjklqwer
  • 3,536
  • 21
  • 19
1

The SDK is not build for Visual Studio, but for mingw, IIRC. You probably need to build it yourself. (Easy, but it takes a while)

Then you configure your local Qt installation in Visual Studio (add version, point to recently built Qt-dir).

Now, in early versions of the Add-in, it was possible previously to convert an existing project into a Qt project using the Add-in. It doesn't seem possible in the later ones.

It can still be done manually, and I did this last year. Create a new Qt-project and compare the .vcproj-files. There are some extra xml elements and attributes that need to be copied over, and then, IIRC, the lib/include updating should work as you should be able to add Qt modules to it from visual studio.

Macke
  • 24,812
  • 7
  • 82
  • 118
  • 1
    How do you convert an existing project? I couldn't find the functionality in 1.1.5, ditto in 1.1.7. – asdfjklqwer Nov 20 '10 at 02:46
  • I've got this simply 2D game already made and I've decided I'd like to make it multi-user/networked, and all I really need the QT functionality for is to provide a simple pop up box that asks for an IP address. – Ryan Nov 20 '10 at 05:38
  • 1
    Converting doesn't seem possible for later versions of the add-in. Sorry about being wrong. It is doable manually though, and I've updated the answer to match. (not the best solution, but still _a_ solution) .... which is what Nathan wrote... upvoting him. :) – Macke Nov 21 '10 at 20:29