Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to work with Qt4 projects in Visual Studio 2012 using add-ins?

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?

like image 815
ilya Avatar asked Mar 05 '13 10:03

ilya


2 Answers

How to enable debug visualizer for Qt classes in VS2012 (Qt 4.6.x):

  1. Download and install qt-vs-addin for Qt5 for VS2012 (tested on version 1.2.2);
  2. Open Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Packages\Debugger\autoexp.dat in editor;
  3. Uncomment QString and QByteArray sections for Qt4 and comment out (with ';') QString and QByteArray sections for Qt5;
  4. 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").
  5. Profit!
like image 165
suryadeva Avatar answered Oct 15 '22 15:10

suryadeva


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)

Qt Versions

like image 20
bzs Avatar answered Oct 15 '22 16:10

bzs