Another note to myself which I hope will be useful for others searching it.
Add the following lines to your PRO file in Qt, or create a PRI file using the following and include that in your PRO file.
Note that it is assumed here that OpenCV for Android is extracted to “C:/opencv/OpenCV-android-sdk”
INCLUDEPATH += C:/opencv/OpenCV-android-sdk/sdk/native/jni/include
OPENCV3RDPARTYLIBS = C:/opencv/OpenCV-android-sdk/sdk/native/3rdparty/libs/armeabi-v7a
OPENCVNATIVELIBS = C:/opencv/OpenCV-android-sdk/sdk/native/libs/armeabi-v7a
LIBS += $$OPENCV3RDPARTYLIBS/liblibtiff.a \
LIBS += $$OPENCVNATIVELIBS/libopencv_core.a \
Note that you need to copy “libopencv_java.so” to “android-sourceslibsarmeabi-v7a” under your project folder. (If you forget this you’ll face an error mentioning the missing Library file!)
Obviously you should also have the following line in your PRO file so that Qt looks for your Android override files and resources here:
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android-sources
Here OpenCV 2 and Qt 5.4 are used but it should be pretty much the same for other versions. (Later versions perhaps)
(Updated on 2015-12-15)
Or you can just simply download my .PRI file below and include it in your project (if you have OpenCV installed in C drive’s root)