views:

634

answers:

2

How can I convert existing vcproj files to project files that the QT add-in to Visual Studio recognizes and treats as valid Qt projects?

Should I just bite the bullet and create new projects to replace the old ones, and then add existing code?

I am using QT 4.6 and VS 2008 with Qt Add-in 1.1.2. Original vcproj files have NOT been generated with QMake.

+1  A: 

Here's the response from Nokia support engineer, name removed for privacy protection:

Hi,

Thanks for the suggestion. I have passed it on to our developers who will consider implementing it for a future release. You can track it using the following link:

http://bugreports.qt.nokia.com/browse/QTBUG-8174

Regards, Support Engineer, Qt Development Frameworks, Nokia >

Original question

We have quite a few legacy vcproj projects that we wish to add Qt to it. Currently, we don't have an easy way to convert these legacy vcproj files into a Qt-enabled vcproj.

What do I mean by Qt-enabled?

On a non-Qt-enabled vcproj, when I right click on the project name under Solution Explorer, all options related to Qt are all grayed-out.

It would be really useful if Nokia adds this capability to VSTD Add-in.

Stackoverflow fellows, if you would like to see this feature implemented by Nokia, please help vote for it at the link above! =)

ShaChris23
A: 

More answer from Qt support engineer; I think the first pargraph is helpful as I didn't know that before:

i think this is a misunderstanding really. If you have a Qt project generated with the Add-in, then you can change this project into a qmake generated Qt project - and vice versa; If you have a .vcproj that has been generated by doing qmake -tp vc, then you can convert this to a Qt Add-in project.

There is no functionality to convert a regular win32 project into a Qt enabled project, so the suggestion created is still valid, see:

http://bugreports.qt.nokia.com/browse/QTBUG-8174

I can see from the history of this report that it has been closed and re-opened again, so I assume there was a misunderstanding regarding what you were looking for in the first place.

If you create a .pro for you project using qmake, then you should be able to create a .vcproj file using 'qmake -tp vc' on that .pro file. The qmake manual is available here:

http://doc.trolltech.com/4.6/qmake-manual.html

I hope this helps.

Regards,

--

Support Engineer, Qt Development Frameworks, Nokia

ShaChris23