pkg-config
In this tutorial we will learn how to configure Qt to use OpenCV. Although the tutorial is targeted for OSX users, you can modify my suggestions for use in Linux
Let’s say you want to compile and run the face detection sample code that comes with the OpenCV. This code is located at OpenCV 2.4.x : /path/to/opencv/samples/c/facedetect.cppOpenCV 3 : /path/to/opencv/samples/cpp/facedetect.cpp