Size missmatch Error when trying to use OpenCV with QT
I have run into problems with getting OpenCV working with QT. I am sitting on a machine using an up-to-date Kubuntu installation, QT 5.3 and OpenCV 2.4.9. Everything works on it's own, but as soon as I want to compile something like "Mat mat1 = cv::imread(fileName);" I get the following Error: "QMetaType::registerType: Binary compatibility break -- Size mismatch for type 'QPaintBufferCacheEntry' . Previously registered size 0, now registering size 16."
My project compiles fine on a different machine, so I guess there's something wrong with my installation. I followed the steps found here: http://qt-project.org/wiki/OpenCV_with_Qt .
Hi and welcome to devnet,
Are you sure you have OpenCV built with Qt5 ?
Is there a way to check that? I am pretty new to cmake and Qt. As said I just followed the steps from "Installation in Linux", which led to a working OpenCV installation, as the example apps compile and run. But it refuses to work with Qt. Do I have to tell cmake somehow to use Qt for building?
You can call ldd on libopencv_highgui.so to see what libraries are linked