Pergunta

I'm trying to install opencv (2.4.5) with Qt in my fresh Ubuntu 13.04.

I've downloaded opencv, executed:

ccmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ../opencv-2.4.5

../opencv-2.4.5 is the folder of the opencv source

and in ccmake I changed the WITH_QT variable to YES

than make and sudo make install

But now if in kdevelop I try to execute my test code (I only call addText(...) over an image). I get the following error:

OpenCV Error: The function/feature is not implemented (The library is compiled without QT support) in fontQt, file...

What I'm doing wrong? Thanks in advance for any suggestion

edit: I had both qt4 and qt5 due to the QtCreator installation. For a fast solution I removed qt5 and qtcreator and reinstalled opencv.

Now it works, but is there a cmakelist for opecv that enable to use qt5?

Foi útil?

Solução 2

I'm not sure if I should answer my question, anyway:

If you look at the github repository of OpenCV, 4 days ago the CMakeList.txt has been updated to support Qt5.

So the solution is to clone the project and install it from source. I tested it and it works.

Outras dicas

Have you looked at This Using CMake with Qt 5

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top