diff --git a/CONTRIBUTORS b/CONTRIBUTORS index a24b61799..84089f868 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -199,6 +199,7 @@ Park Hyunwoo Tomas Fabrizio Orsi Sawan Sunar hideo aoyama +Ross Brown ******************** diff --git a/qt/aqt/__init__.py b/qt/aqt/__init__.py index 2c39253c3..eca04b261 100644 --- a/qt/aqt/__init__.py +++ b/qt/aqt/__init__.py @@ -3,6 +3,7 @@ from __future__ import annotations +import atexit import logging import sys from collections.abc import Callable @@ -525,6 +526,7 @@ def setupGL(pm: aqt.profiles.ProfileManager) -> None: print(f"Qt {category}: {msg} {context}") qInstallMessageHandler(msgHandler) + atexit.register(qInstallMessageHandler, None) if driver == VideoDriver.OpenGL: # Leaving QT_OPENGL unset appears to sometimes produce different results