Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Here are the steps that worked for me in configuring OpenCV with Qt and Visual Studio:

  1. Make sure you download the Qt source from here (make sure you download the zip file, in the Qt download page look for: "The source code is available as a zip..."
  2. Extract the zip file (say in: C:\Qt\QtSource485)
  3. Then you need to build it. Start up a Visual Studio Command Prompt (2010).
  4. Now navigate to the extracted folder and enter inside it by using the console window.
  5. Enter the following command (it worked for me fine):

    configure.exe -release -no-webkit -no-phonon -no-phonon-backend -no-script -no-scripttools -no-qt3support -no-multimedia -no-ltcg

  6. Then enter

    nmake

  7. Then add the built binary files path to the system path...If you have Matlab installed, make sure the C:\Qt\QtSource485\bin path is set BEFORE the Matlab path (this is crucial it took me hours to find why it does not worked otherwise!)

  8. Now start the CMake (cmake-gui). Check the 'Advanced' tick box before pressing Configure.
  9. After configuration tick 'WITH_QT'.
  10. Untick the 'Advanced' tick box.
  11. Press again Configure.
  12. Look for the 'QT_QMAKE_EXECUTABLE' option and browse: 'C:/Qt/QtSource485/bin/qmake.exe'
  13. Press generate and you're done. Then you are ready to build OpenCV with Qt! Good luck!