From 7d33e5a4a02feb4d84392ec195648ad25e7f6986 Mon Sep 17 00:00:00 2001 From: Corran Webster Date: Mon, 4 Jul 2022 14:14:17 +0100 Subject: [PATCH] Hide controls after deleteLater is called, not before. --- traitsui/qt4/toolkit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/traitsui/qt4/toolkit.py b/traitsui/qt4/toolkit.py index 839065e7e..a91f647c8 100644 --- a/traitsui/qt4/toolkit.py +++ b/traitsui/qt4/toolkit.py @@ -382,8 +382,8 @@ def destroy_control(self, control): # This may be called from within the finished() signal handler so we # need to do the delete after the handler has returned. - control.hide() control.deleteLater() + control.hide() def destroy_children(self, control): """Destroys all of the child controls of a specified GUI toolkit