Bring your existing Qt projects to Visual Studio

Marian Luparu

Qt framework is an ever growing cross-platform C++ framework, ideal for building desktop, mobile, and even embedded solutions. While you can use CMake to target Qt (if you do, you should read more about the Visual Studio support for CMake), Qt also provides its own Qt-optimized build system called qmake.

If your project is using qmake, this article covers the high-level steps to follow to import your projects into Visual Studio. You can read about other C++ project types in the guide for Bringing your C++ code to Visual Studio.

bringcode-qt

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.

What’s next

If you’re new to Visual Studio, learn more by reading the Getting Started with Visual Studio for C and C++ Developers topic and the rest of the posts in this Getting Started series aimed at C++ users that are new to Visual Studio. Download Visual Studio 2017 today, try it out and share your feedback.

2 comments

Discussion is closed. Login to edit/delete existing comments.

  • ÇaÄŸlar Dursun 0

    That extensions is totally a garbage …
     
    Compiling looks Ok.
     
    But If you are talking about debugging, It’s like a nightmare. Qt5 natvis file is still poor btw. Qt5.natvis file contains just only a few qtcore data types. like QString or QRect etc
     
    Think about it… You wanna see the inside of QFile or QDir but debugging helper give you nothing. That’s why Visual Studio is not a good IDE option for developing Qt apps. 
     

  • Wil Wilder Apaza Bustamante 1

    I don’t think syntax checking counts as debugging personally.  They make debuggers, ACTUAL debuggers for well, real work.  Try OllyDBG.  If your ability to code depends on the syntax checking of a single program, well, perhapse your skills are garbage.  Try coding without a ide then tell other people what you think is good and why… they might care.

Feedback usabilla icon