I've found that Qt VS addin 1.1.x worked with Visual Studios including 2010.
Qt VS addin 1.2.x does not support Qt4 in VS 2012. Are there any forks of this addin which can cope with Qt4 in VS 2012?
How to enable debug visualizer for Qt classes in VS2012 (Qt 4.6.x):
- Download and install qt-vs-addin for Qt5 for VS2012 (tested on
version 1.2.2);
- Open Program Files (x86)\Microsoft Visual Studio
11.0\Common7\Packages\Debugger\autoexp.dat in editor;
- Uncomment QString and QByteArray sections for Qt4 and comment out (with ';')
QString and QByteArray sections for Qt5;
- Run VS2012, open Tools->Options->Debugging->Edit and Continue. In the group box for
Native-only Options, check "Enable native Editor and Continue." This
will force VS to use autoexp.dat, rather than the XML-based native
vis definitions (ie, the so-called "data viewing enhancements in the
debugger").
- Profit!
Yes it is possible with the VS addin 1.2.2. I use this addin version and Qt 4.8.1 in Visual Studio 2012 together.
The addin has limitations for Qt4, but it does the whole moc and ui stuff for you.
The limitations are:
- you must specify the Qt4 include directories and lib paths self (not clickable)
- you have no Qt 4 file templates (but still works, after changing the include directives of the Qt4 header files according to the Qt4 file structure)