Integrating QT into Large Visual C++ 2013 Project ...



  • Hello,

    I have a rather large Visual C++ 2013 project I would like to integrate QT with. Per multiple instructions online I perform the following inside of the project folder:

    @
    C:[[LocationOfProject]]>C:\Qt\5.3\msvc2013_opengl\bin\qmake.exe -project -spec win32-msvc2013 -tp vc
    @

    From here I get a pro file generated but what do I do with the pro file? Ideally it is rumored that I would get a vcproj file which I can then edit but I don't know how to generate one.

    I would like to work on my project completely in Visual Studio if possible.

    Thank you for your time.



  • Hi,

    If what you want is "just" to use Qt with visual compiler, you should consider using QtCreator as IDE with a .pro file like the one you generated -- if it not already done, take a look on the documentation of qmake including this "page":http://qt-project.org/doc/qt-5/qmake-running.html which explain the "-project" option. If you want to use visual studio as IDE, you can use your .pro file to generate vcproj with "-tp vc" option (take a look "here":http://qt-project.org/doc/qt-5/qmake-platform-notes.html#creating-visual-studio-project-files), but you should never modify it from visual studio gui: modify the .pro file and regenerate the vcproj instead.

    note: another way to generate vcproj working with Qt is to use CMake.



  • Thank you very much; the steps for doing this aren't clear.

    I guess it is natural that Qt would hawk their Qt Creator for their stuff but Visual Studio truly is a better development environment for creating software on Windows.

    So, for other folks to help them out you need to run "qmake.exe -project -spec win32-msvc2013 -tp vc" FIRST THEN run "qmake.exe -tp vc -r"

    (The -r option may be unnecessary, I just include it in case you have sub-projects inside the main folder).


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.