Search code examples
c++visual-studioqtsln-file

Export Visual Studio project to Qt Project


I would like to export my Visual Studio Project to a Qt project.

How to generate a .pro file from a Visual Studio Project? I installed the Qt Add-In but I don't find such option.


Solution

  • With Visual Studio Qt plugin installed (officially named Qt VS Tools, can be downloaded from here), just:

    1. Open your solution.

    2. Select any Qt-based project from your solution (or any file within that project).

    3. Go to menu Qt VS Tools > Create basic .pro File.... If you are using an old version of the plugin, menu may be named Qt5.

    4. Select the projects you want to export. Project tags (.pro options, only in newest plugin versions) are automatically extract from your current project, you can modify them if needed or do it later when the .pro is created.

    5. Run qmake or open it from Qt Creator.

    PS: depending on your VS and Qt versions you may need an older version of the plugin. I'm assuming Qt 5 here.

    Hope it helps.