How to convert a regular win32 (VC++ vcproj) project to a Qt project?

后端 未结 5 1215
南方客
南方客 2020-12-24 13:17

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 bull

5条回答
  •  天涯浪人
    2020-12-24 13:45

    I use Qt VS Tools instead of Qt VS Add-in.

    Instructions

    In the .vcxproj file, make the following modifications:

    Add Qt4VSv1.0 into (in accord with Benjamin's answer).

    Add the following element into (the root element):

      
        
          
        
      
    

    Note that the value of the attribute Qt5Version_x0020_x64 should match the name of a Qt version in Qt VS Tools. You may set an arbitrary value and then fix it in Qt Project Settings in Visual Studio.

    My setup

    • Visual Studio 2013
    • Qt VS Tools 2.0.0 Beta (apparently a rebranding of Qt VS Add-in)
    • Qt 5.6 msvc2013_64

    Notes

    When I follow Benjamin's answer and try to "Convert project to Qt VS Tools project", Visual Studio gets stuck.

    The only Qt specific functionality I've tried with the project is exporting a .pri file.

    I have reverse engineered the necessary modifications from a fresh VS project created using the template Qt GUI Application.

提交回复
热议问题