Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Visual Studio vs. Qt Creator on Windows: which is most popular?



  • What do most Windows developers use: Visual Studio or Qt Creator?

    We have a Win32 app that we converted to macOS, using Qt Creator. We are now ready to convert the Win32 version from GDI to Qt. I prefer VS because the Qt Creator debugger has some flaws, but I can live with it.

    What do you use?



  • If you plan to have a portable application, I suggest that you use a single project file for all platforms. One way to go is to use Qt's project files and qmake. However, I believe that both Qt and Visual Studio support cmake projects. So, this would be another possible way.

    In the end it comes down to preferences if you want to use Qt Creator or Visual Studio for development. It is easy to create a VS project file from Qt project files using qmake. I prefer using Qt Creator because I can navigate a lot faster. My colleague, however, uses Visual Studio. In this setup it is a little bit harder for him to add a file to the project because he can't do it in Visual Studio directly. From my experience, using qmake directly to create a VS project tracks dependencies better (though not perfect) than using the Qt plugin for VS.

    Nevertheless, I have to agree with the others that debugging inside Qt Creator is horrible. For this I always switch over to VS because it saves me hours. Our software is quite large and stepping through code takes several seconds for each line of code in Qt Creator. The main problem is with the display of current values of variables. Expanding a class to see its values can take minutes. This is all instantaneous in VS.

    In summary: I personally find Qt Creator superior in navigating code, especially when switching between platforms. But, you will definitely need VS for debugging on Windows anyways. So, you can have a dual setup or go fully VS.

    PS: We are now using FASTBuild for compilation. These are currently generated from the Qt project files (see my github: https://github.com/SimonSchroeder/QMake2Fastbuild). FASTBuild also provides a way to generate a VS project file. This is by far the best way for VS to track dependencies in Qt projects. Otherwise, VS will often recompile some moc and ui files every single time.



  • At work I use Visual Studio when on Windows, mostly for historical reasons (our distributed binaries for windows are produced with Microsoft compiler), and on Linux I use QtCreator.
    I am tempted to use QtCreator only, so that I don't have to switch from one to the other when switching from Windows to Linux.


  • Lifetime Qt Champion

    Hi,

    Qt Creator has no debugger, it's the one provided by Microsoft unless you are using MinGW.

    In any case, use what fits best your needs. Qt Creator main's advantage is that you can get the same user interface in all desktop environments. So you do not have to learn a new IDE on each platform which is also true for KDevelop nowadays.


  • Moderators

    @Sprezzatura said:

    What do most Windows developers use: Visual Studio or Qt Creator?

    That's kinda hard to tell. There's just too many of us and all you can get here are some personal scenarios of few devs.

    That being said, for me - I worked on couple of big projects and it's VS in all of them. Usually because Qt is just a small part of the entire project and only some of the components are using it. In my experience VS debugging experience is way above that of Qt Creator too, especially in more advanced scenarios than just looking at couple of variables. As @SGaist said Qt Creator is using an external debugger, but its integration into the IDE is lacking IMO. VS has also great profiling tools built in which is a tremendous advantage in my line of work.

    For small personal Qt projects I use Qt Creator just because it has better Qt support in general and I don't need to debug as much, but VS is my IDE of choice if Qt is not the center of the project.

    Another consideration for me is integration with external tools and frameworks, unrelated to Qt, and for those important to me VS is usually the number one target on Windows with very minor, if any, support for other IDEs, including Qt Creator.

    I did a large MFC to Qt port, so a similar scenario and it was all done using VS and very custom build system. Looking back I think it would be a lot more difficult doing in Qt Creator taking into account the amount of Windows specific debugging involved.



  • @SGaist Do you mean that Qt uses the VS debugger? Then why is it so bad? I can't be the only who has noticed that (Qt Creator 4.11.0):

    • 'assert' executes in Release mode
    • 'assert' crashes instead of displaying an error message
    • Displaying some variables locks up QC when expanding an object
    • Can't display some variables in Debug mode, ex: static variables, globals
    • Debugger easily loses control, need to restart
    • Can't collapse #if/#endif or regions
    • App dialogs dominate screen when stepping through in Debug mode; have to manually move aside
    • Qt has crashed when re-encoding source file from UTF-8
    • Change .PRO, Build doesn't pick it up, have to Rebuild all
    • Editor can't handle Unicode files, displays as hex (binary)
    • When debugging & going up stack, doesn't show value of variables in Numeric Expression window
    • Loses bookmarks when file closed
    • Sometimes F2 (go to definition) doesn't work
    • When opening a file, if Command-Shift-G to copy file name in Finder, can't Command-V to paste, must right-click & paste (macOS)
    • Debugging erratic: Command+Y doesn't always start
    • Search Project: misses some .H header files
    • Stops at one function higher than breakpoint
    • Mixes up {}/[]/() when pairing (Cmd-[ )
    • My Intellisense no longer works, can't figure out how to reactivate

    In order to determine "what best fits my needs", I would prefer to hear from other veterans about the pros and cons, rather than spend weeks figuring it out the hard way :o)



  • @Sprezzatura said in Visual Studio vs. Qt Creator on Windows: which is most popular?:

    Do you mean that Qt uses the VS debugger?

    Qt uses either the MinGW/gdb debugger, or the MS one. But that is only as the "back-end". Even when it uses MS debugger, it does not give the Visual Studio "front-end" experience, only its own, which is arguably "inferior".

    You raise a number of points, but some of them do not, or should not, have anything to do with the debugger (ah, I see, some of them are debugger, some of them are other Creator issues). For example

    'assert' executes in Release mode

    This is a compilation issue, not a debugger one. (BTW, it's down to the NDEBUG symbol.) Whether you use Qt Creator/debugger should not affect this. It does not for me. Nor, for that matter, for me does "'assert' crashes instead of displaying an error message". But maybe our environments are different. I don't know, you have a long list(!), maybe you'd like to open your own thread with these and see if people can help you on individual ones....


  • Moderators

    To be precise - there's more than one Windows debugger - WinDbg, KD, CDB, NTSD are some of them. Qt Creator is using CDB. This is one of the debuggers provided by the Debugging Tools For Windows package that is part of Windows SDK. It is not the same debugger that is used in VS and VS is not required at all to use it. In fact you can install just the MSVC compiler and Debugging Tools and have no VS on your computer at all to compile and debug in Qt Creator.

    As for specific issues - as @JonB said only few of those have anything to do with the debugger. Others are related to the compiler, code model, text editor, toolchain or build system - all different components.



  • @Chris-Kawa Yes, I realize it's not all strictly the debugger. It's just a general Qt Creator rant :o) I guess I've been spoiled by VS.



  • If you plan to have a portable application, I suggest that you use a single project file for all platforms. One way to go is to use Qt's project files and qmake. However, I believe that both Qt and Visual Studio support cmake projects. So, this would be another possible way.

    In the end it comes down to preferences if you want to use Qt Creator or Visual Studio for development. It is easy to create a VS project file from Qt project files using qmake. I prefer using Qt Creator because I can navigate a lot faster. My colleague, however, uses Visual Studio. In this setup it is a little bit harder for him to add a file to the project because he can't do it in Visual Studio directly. From my experience, using qmake directly to create a VS project tracks dependencies better (though not perfect) than using the Qt plugin for VS.

    Nevertheless, I have to agree with the others that debugging inside Qt Creator is horrible. For this I always switch over to VS because it saves me hours. Our software is quite large and stepping through code takes several seconds for each line of code in Qt Creator. The main problem is with the display of current values of variables. Expanding a class to see its values can take minutes. This is all instantaneous in VS.

    In summary: I personally find Qt Creator superior in navigating code, especially when switching between platforms. But, you will definitely need VS for debugging on Windows anyways. So, you can have a dual setup or go fully VS.

    PS: We are now using FASTBuild for compilation. These are currently generated from the Qt project files (see my github: https://github.com/SimonSchroeder/QMake2Fastbuild). FASTBuild also provides a way to generate a VS project file. This is by far the best way for VS to track dependencies in Qt projects. Otherwise, VS will often recompile some moc and ui files every single time.



  • @SimonSchroeder Now this is the kind of information I was looking for. Thank you. Based on your experience, my inclination will be to use Qt Creator on Windows, because it's important we have one single .PRO file. And switch to VS in difficult debugging situations. You will have saved me a lot of trial & error.



  • @Chris-Kawa Very helpful. Thank you. Although I'm inclined to go Qt Creator, I will make note of your experience if we encounter problems with that strategy.



  • @Sprezzatura Update: We settled for Qt Creator. Its debugger has weaknesses, but it is more important to have a consistent .PRO file to share between macOS and Windows.


Log in to reply