Widget with @Work: how to self remove? #2837
-
I have a widget that display the logs of a command. Upon completion, the widget should self-destruct:
It seems that the
I should use "call_from_thread", but I don't have access to the "App" object from inside this widget. Any idea? |
Beta Was this translation helpful? Give feedback.
Answered by
willmcgugan
Jun 26, 2023
Replies: 1 comment 1 reply
-
You should be able to get a reference to the app with Note that you probably shouldn't call |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
jehon
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should be able to get a reference to the app with
self.app
.Note that you probably shouldn't call
self.start
from the initializer. Better to call it fromon_mount
, to ensure the app and widget are running.