Search code examples
c++windowsqtwxwidgets

Qt in Windows: build environment and redistribution problems


I want to ask your opinion about one specific aspect of endless "Qt vs wxWidgets" question. Using wxWidgets in Windows, I may continue to work with my prefered build tools and compilers (in my case, Visual Studio). I only need to add wxWidgets include and lib directories to the compiler/linker path. When necessary, I just open some wxWidgets form designer (like DialogBlocks) and make form layout. Executables don't have any additional dependencies and don't cause any problems in redistribution.

On the other hand, Qt comes with its own IDE which tends to be the main development tool (which I don't want). It installs MinGW. It uses qmake, this is one more challenge in integrating Qt to existing build environment. I don't know how to use my existing libraries, developed with VC++, in Qt application. Can I continue to work with Visual Studio or I need to switch completely to Qt Creator? Or use both, building everything but UI in Visual Studio, and UI in Qt Creator? How Qt-based application can be redistributed: should I require MinGW installation on target computer?

How all these problems are solved - I need some directions and opinions from C++ developers working with Qt in Windows.

Edit: It looks like most promising directions are Visual Studio plugin and CMake. I found that Qt plugin supports VS2010, but it requires rebuilding Qt from the source. For VS2008 this plugin works with binary Qt installation - good enough.


Solution

  • You can use Visual Studio. There is a Visual Studio integration plugin that makes it a lot lot easier to develop with Qt in Visual Studio.

    As for the wxWidgets vs Qt debate... I use both (on different projects). I have to say that I would rather use Qt - it has fewer bugs IMO and in general there is an easier workaround if you have problems with the framework (Qt4 is much better in this regard than Qt3 was because the 'pimpl' data is accessible). However, distribution is slightly more complicated with Qt as you must make sure that you have set included any plugins correctly in your distro (be sure to check that it works on a clean machine that does not have Qt installed).