Compare commits

..

No commits in common. "39a5da7716874b469110430bc252323103e266f4" and "507747d5bef500926a11ceca0a641a52fb7ed546" have entirely different histories.

1 changed files with 1 additions and 3 deletions

View File

@ -1,6 +1,7 @@
from PySide6 import QtWidgets
import util
gui_handler_communication = util.Communication()
app = QtWidgets.QApplication([])
class Window:
@ -35,8 +36,5 @@ 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()