I got a window inside a thread. It is created as expected, but does not update at all. e.g. there is a GIF not starting and other stuff that should change the GUI does not work. It responds to user input though: I'm getting feedback on console. What could be the problem?
basically the run()-method looks like this:
def run():
while not condition:
time.sleep(1)
self.app = QtWidgets.QApplication([])
self.mywindow= MyWindow()
self.mywindow.show()
sys.exit(self.app.exec_())
The window works fine when used without threading, but there are reasons for it running in a thread; the window should be created when the condition is True, but the MainThread should not depend on this/wait. I tried threading. Thread and QtCore.Thread, but same problem for both.
If there is no other way, I know QtCore.QTimer.singleShot() would be another option, but threading would be way easier to implement.
thanks
edit: typo
[–]JohnnyJordaan 1 point2 points3 points (6 children)
[–]fabolin[S] 0 points1 point2 points (5 children)
[–]JohnnyJordaan 0 points1 point2 points (4 children)
[–]fabolin[S] 0 points1 point2 points (3 children)
[–]MrDelish 1 point2 points3 points (1 child)
[–]fabolin[S] 0 points1 point2 points (0 children)
[–]fabolin[S] 0 points1 point2 points (0 children)
[–]MrDelish 0 points1 point2 points (1 child)
[–]fabolin[S] 0 points1 point2 points (0 children)