From 39a5da7716874b469110430bc252323103e266f4 Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Sat, 19 Mar 2022 12:17:12 +0100 Subject: [PATCH] idea for fixing the threading problem --- gui_handler.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gui_handler.py b/gui_handler.py index ace0161..25ee200 100644 --- a/gui_handler.py +++ b/gui_handler.py @@ -35,5 +35,8 @@ class Window: # There are some issues with these workarounds though; mainly that QT isn't thread safe. # I really want to keep QT running in its own thread because I want to retain the ability to arbitrarily spawn and manipulate windows while other windows are running. # Another issue that is probably easily worked around / fixed is that app.exec() will return once all running windows are closed. +# Idea for a workaround for both: +# Maybe Qt has scheduled events in which case a scheduled polling event could run a function inside the Qt thread that fetches commands and executes them. +# This could work by passing (lambda) functions through a Communication object. def fixme_window_mainloop_workaround_to_just_get_a_window_started_really_should_not_be_implemented_this_way_for_reasons_stated_in_the_comment_above_the_definition_of_this_function(): app.exec()