Skip to content

Issue with getWindowProperty(cv::WND_PROP_VISIBLE) #22595

@thewoz

Description

@thewoz

Hi I have a issue with getWindowProperty(cv::WND_PROP_VISIBLE) always returns -1
Here the example code:

int main(int argc, const char * argv[]) {
  
  cv::namedWindow("test");
  
  cv::Mat image = cv::imread("/Users/thewoz/Desktop/img.png");

  printf("%f\n", cv::getWindowProperty("test", cv::WND_PROP_VISIBLE));

  cv::imshow("test", image);
  
  printf("%f\n", cv::getWindowProperty("test", cv::WND_PROP_VISIBLE));
  
  cv::waitKey(0);
  
  printf("%f\n", cv::getWindowProperty("test", cv::WND_PROP_VISIBLE));
  
  return 0;
  
}

Turning on Mac it returns -1, -1, -1 on linux instead it returns 1, 1, 1 which seems to me to be correct.
Does anyone know how that happened?

  • OpenCV fetched via GitHub
  • Operating System MacOs 12.6
  • QT 5.15.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions