Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt and OpenCV help



  • Hi I am looking to build a gui with qt and OpenCV and wondering which way would be best to combine them. Should I install both in a VM and cross compile or install both on the Pi. I have a Pi4 B+ and have OpenCV 4.3.0 built from source working on it. I had qt creator built on a VM Ubuntu machine cross compiled to the Pi but I could not get OpenCV to work with it. I had to resize my VM hd but it would not boot after so I’m starting again and looking for pointers. Is there any guides for this. When I had qt working included the header files in the . Pro but they didn’t appear in the main and got errors no such files when tried to build with the OpenCV commands. Thanks for any help.


  • Qt Champions 2019

    @robd said in Qt and OpenCV help:

    I could not get OpenCV to work with it

    What was the problem?
    And to make it clear: you need to cross-compile Qt for RPi, not QtCreator.



  • Hello,
    the solution that I adopted is https://doc.qt.io/QtForDeviceCreation/qtee-custom-embedded-linux-image.html, where you build a custom image and the cross compiler. In this way you can customize your image and toolchain without downloading any source code because it's the program itself that takes care of it.
    For adding the opencv I simply add in local.conf file IMAGE_INSTALL += "opencv".


Log in to reply