26

I have a QtCreator project file *.pro

How to convert it to Visual Studio 2008 project *.sln?

Dmitriy
  • 5,357
  • 8
  • 45
  • 57

3 Answers3

26

You can also use the qmake command to do this. Go to the project dir and type "qmake -tp vc".

spmno
  • 805
  • 7
  • 13
  • 3
    The best answer :) +1 – Farah Nov 20 '13 at 10:24
  • Using Visual Studio Express 2015 and opening the .vcproj file created I get a window telling me the file will be upgraded for this version of Visual Studio. Then I get an error message that the upgrade failed. What I should I do / check ? – Charles Sep 27 '16 at 14:05
  • Maybe your qt project is not created by the vs2015 compiler. – spmno Jan 11 '17 at 08:11
6

Qt Creator / qmake can generate .vcproj files directly.

See this link

Put "TEMPLATE=vcapp" or "TEMPLATE=vclib" (as appropriate) in your .pro file and run qmake. That will generate a .vcproj file.

Edit: The link no longer worke, but I found an archive of it here

eatyourgreens
  • 1,053
  • 1
  • 12
  • 16
6

It's now possible to open the .pro file directly from the Qt Visual Studio Tools extension. Visual Studio will then generate the necessary solution files. Currently the extension is available for VS2013, VS2015, VS2017, VS2019 and VS2022.

Step 1. Install the QT Visual Studio Extension. From the Marketplace, install the Qt Visual Studio Tools extension.

Step 2. Import your .pro projects into Visual Studio. To do that, select the Qt VS Tools > Open Qt Project File (.pro) to let the extension create a VS solution and project from your existing Qt .pro file. More information on this is available in the Qt docs covering Qt project management in Visual Studio.

Answer copied from this blog post: Bring your existing Qt projects to Visual Studio.