idea for fixing the threading problem
parent
e1fd26aa0f
commit
39a5da7716
|
@ -35,5 +35,8 @@ class Window:
|
||||||
# There are some issues with these workarounds though; mainly that QT isn't thread safe.
|
# 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.
|
# 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.
|
# 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():
|
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()
|
app.exec()
|
||||||
|
|
Reference in New Issue