Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Size missmatch Error when trying to use OpenCV with QT
Qt 6.11 is out! See what's new in the release blog

Size missmatch Error when trying to use OpenCV with QT

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hi all,

    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' [1024]. 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 .

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Are you sure you have OpenCV built with Qt5 ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Hi,

        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?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You can call ldd on libopencv_highgui.so to see what libraries are linked

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved