I am trying to use OpenCV library in QT but i'm keep getting error which shouldn't suppose to occur.
Here is the code of my simple program.
#include <opencv2/highgui/highgui.hpp>
using namespace cv; //All classes and functions defined in the C++ API of OpenCV are defined within the name space cv.
using namespace std;
int main(){
Mat image = imread("C:/opencv/opencv/samples/c/cat.jpg",CV_LOAD_IMAGE_GRAYSCALE);
cout << "Number of Rows: " << image.rows << endl << "Number of coloumn: " << image.cols;
imshow ("image",image);
waitKey(0);
}
C:\Users\Cipher\Downloads\Programs\untitled2\main.cpp:1: error: C1083: Cannot open include file: 'highgui.hpp': No such file or directory
The problem is that, the file is there but QT couldn't able to find the file, i can access the file and even when i hold ctrl and move my cursor over #include <opencv2/highgui/highgui.hpp> and click on it i am successfully accessing a file, but still QT keep saying that it could find such file or directory :/ what is the problem with that :/
have a look,

I can access all the methods in the CV namespace then why i am still getting this error ?
have a look,

all functions of opencv are accessible but still i'm getting the error aforementioned.
please guide me.