I found two good websites which they explain OpenCV and Qt integration. Here is a website that explain OpenCV installation well. And another website explains more about QT side. You may face two problem if you follow these two websites.
1 ) When you follow the first website steps change the “-D WITH_QT=ON” to “-D WITH_QT=OFF”. Then you will not have a problem.
2 ) Another change you need to do is for the second website. In the website, it is saying that we need to add this lines to .pro file.
INCLUDEPATH += `pkg-config --cflags opencv`
LIBS += `pkg-config —libs opencv`
Actually it did not work for me. So instead of those two lines I added the code below. :
INCLUDEPATH += /usr/local/include/opencv \
LIBS += -L/usr/local/lib \
Then it works fine. One more quick detail if you add the code below to .pro file you will not see .moc and .obj files in the directory.
OBJECTS_DIR = .obj
MOC_DIR = .moc
I hope this information helps you. Good bye.