LE: misunderstood the question
The WITH_QT parameter is used by the highgui module to create windows using qt, so converting QImage to cv :: Mat and vice versa will work regardless of how the WITH_QT option is set.
First, some clarifications: you are not compiling OpenCV with Qt, Qt is not a compiler, so you cannot compile anything with it. Qt is a C ++ library (it is called frameworkbecause it imposes some some rules on the source code of your application, but basically it is a C ++ library, like OpenCV).
, ++ world *, , ( ), , ++ , Qt OpenCV, , , .
MinGW, OpenCV MinGW, OpenCV ( , 2410) Visual ++ 10, 11, 12 - Visual Studio 2010, 2012 2013.
, Visual Studio, , Qt OpenCV , MinGW, OpenCV MinGW.
* , C, Qt, OpenCV.
// , : c++ binary compatibility c++ abi