From fdbaf844230b01ff96f20863b762cc83fad34c38 Mon Sep 17 00:00:00 2001 From: tassaron Date: Mon, 2 May 2022 19:37:02 -0400 Subject: add useful comment about why this reference exists --- src/gui/preview_thread.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/gui/preview_thread.py b/src/gui/preview_thread.py index 8ec5d28..3943a5c 100644 --- a/src/gui/preview_thread.py +++ b/src/gui/preview_thread.py @@ -80,6 +80,8 @@ class Worker(QtCore.QObject): except RuntimeError as e: log.error(str(e)) else: + # We must store a reference to this QImage + # or else Qt will garbage-collect it on the C++ side self.frame = ImageQt(frame) self.imageCreated.emit(QtGui.QImage(self.frame)) -- cgit v1.2.3