Important: Please read the Qt Code of Conduct -

Adding Qt to an Existing Visual Studio project?

  • As above, aside from doing it manually, is there an easy way to configure an existing project to use Qt?

  • You can try to run
    qmake -project
    in your sources folder, after it check .pro file for all needed sources, headers and libs and convert it to .vcproj using VS-addin

  • Mixed results, essentially broke my project file, thought I could recover it but no such luck. Any other ideas?

  • If it didn't help then manual solution will definitely do the trick :) Maybe there are some other ways in msvs. Didn't use it (except msvc 6 and small projects in msvc 2005), so don't know.

  • you can just add the libs and include paths, but it then is no "real" Qt project, which means Qt plug-in will not add moc steps etc.

    SO two options:

    do it by hand :-(

    create a pro file and convert it to vcproj file --> do the settings again :-(

  • There is a third option - switch to QtCreator. But it is a serious tool switch and, of course, it will require some manual operations on creating project.

  • And it does not always work :-)

    I like creator, but for business, I have to use MSVS. We have our build system based on MSVS, so there is no way around, and I don't know, whether it is something similar for him.

  • Thanks guys, I ended up doing it manually, including modifying the project file to get it to moc properly. I could switch to Qt creator, however there are a few problems:

    1. It's a DLL project (I'm not sure if this is an issue).
    2. It's massive.

    Which IDE I use has flow on effects for other developers I work with, so it's gotta be Visual Studio. There's a bit of manual fiddling here and there, but hopefully it will suffice.

  • I'm new to Qt and need to do what you did "manually". Perhaps I simply haven't found it yet, but can you point me to he manual steps you used? Thanks.

  • If you have an proper *.pro file You can do :
    qmake -tp vc

    (see QMake manual "Creating Visual Studio Project Files")


Log in to reply