resizeWindow doesn't work properly with Qt backend (Bug #4244)


Added by Luis Díaz Más almost 10 years ago. Updated almost 10 years ago.


Status:Done Start date:2015-03-18
Priority:Normal Due date:
Assignee:Luis Díaz Más % Done:

100%

Category:highgui-gui
Target version:-
Affected version:branch '2.4' (2.4-dev) Operating System:Linux
Difficulty: HW Platform:x64
Pull request:

Description

I noticed that the function resizeWindow doesn't work properly when using the Qt backend (Either with Qt4 or Qt5), while it works as expected with the GTK backend.

A simple code snippet like this can reproduce the situation:

#include <opencv2/highgui/highgui.hpp>

int main()
{
        cv::Mat img(400, 400, CV_8UC1, cv::Scalar::all(255));

        cv::namedWindow("img", cv::WINDOW_NORMAL | CV_WINDOW_KEEPRATIO);
        cv::moveWindow("img", 0, 0);
        cv::resizeWindow("img", 800, 800);

        cv::imshow("img", img);
        cv::waitKey();
}

I attached to screenshots depicting the my desktop just after running the application and having opencv compiled with the different backends.


CaptureWithQtBackend.png (214 kB) Luis Díaz Más, 2015-03-18 07:39 pm

CaptureWithGtkBackend.png (122.1 kB) Luis Díaz Más, 2015-03-18 07:39 pm


Associated revisions

Revision d14a1de9
Added by Luis Díaz Más almost 10 years ago

Fixing the bug #4244 that I just reported in code.opencv.org

Revision e6f7e96f
Added by Luis Díaz Más almost 10 years ago

Fixing the bug #4244 that I just reported in code.opencv.org

History

Updated by Luis Díaz Más almost 10 years ago

Solved with a minor change. It has been only tested in Ubuntu 14.04 x64

  • Status changed from New to Done
  • Assignee set to Luis Díaz Más
  • % Done changed from 0 to 100

Also available in: Atom PDF