Ask Your Question

opencvuser100's profile - activity

2017-04-20 10:16:16 -0600 answered a question OpenCV CV_WINDOW_KEEPRATIO doesn't work

Had the same effect, OpenCV 2.4.13, Debian Testing, KDE5 Plasma, Qt 5.7.1

For me I found two possible solutions:

  1. when compiling OpenCV, use cmake switch -DWITH_QT=4 (works even on Debian testing system with KDE5, but needs libqt4-dev package)
  2. modify .../opencv-2.4.13/modules/highgui/src/window_QT.cpp : search for resize(newSize); and insert the following line after it: viewport()->resize(newSize);