Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4988

Python • picamera2 prevent user from closing preview window

$
0
0
Hello.

I'm building a Python app that involves displaying a preview window. However, I don't want the user to be able to close the preview window; rather, I want to close it programmatically. I know how to do this with the main window by calling root.protocol("WM_DELETE_WINDOW", swallow_event). I want to set this callback only for the image preview window and not the root window, but the picamera2 library hides this.

Statistics: Posted by jmarevans — Wed Aug 14, 2024 11:32 pm



Viewing all articles
Browse latest Browse all 4988

Trending Articles