jitacm / -30DaysDevChallenge-

Welcome to the 30DayDevChallenge repository! This repository is dedicated to a month-long coding challenge designed to help developers of all levels enhance their skills through daily coding tasks and projects.
19 stars 28 forks source link

Image_Recognition/30_days_of_python #187

Open Vishal-shamdasani opened 4 months ago

Vishal-shamdasani commented 4 months ago

the window/tab created by the file does not close when the x button is pressed or alt f4 is used

https://github.com/user-attachments/assets/f7330235-ccbf-4864-b7a5-f3718f4dfe50

github-actions[bot] commented 4 months ago

Thank you for creating this issue! 🎉

We'll look into it as soon as possible. In the meantime, please make sure to provide all the necessary details and context. If you have any questions or additional information, feel free to add them here. Your contributions are highly appreciated! 😊

You can also check our [CONTRIBUTING.md] for guidelines on contributing to this Domain.

pratikshabhujade commented 4 months ago

OpenCV’s cv2.waitKey() function processes keyboard inputs and some window events but may not handle the red cross button for closing the window effectively. Originally, the code only closed the window when 'q' was pressed with this condition: if cv2.waitKey(1) & 0xFF == ord('q'): To address this, we can add a check to detect when the window is manually closed by the red cross button.