Monday, April 29, 2024
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 2109  / 2 Years ago, fri, november 4, 2022, 7:40:06

i am trying to animate a spinner while the programm is running but i can't. I tried using threads but i can't get what i want...you can look here for the progress i made http://www.reddit.com/r/ubuntuappshowdown/comments/vvyav/problem_with_spinner/



i get the spinner to animate but the program stops running...


More From » application-development

 Answers
3

I saw your question yesterday on reddit as well.



When I tried to use threads in python and gtk, it took me like one night to figure it out.



In the end it was as simple as



GObject.threads_init()
Gdk.threads_init()


in the beginning and then spawn threads like you normally would in python with something like



watch_thread = Thread(target=self.function)
watch_thread.daemon = True
watch_thread.start()


I have no idea if that helps you. But I do hope so. I will also take a look at your code and might edit my answer afterwards :)


[#37094] Friday, November 4, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
breadoules

Total Points: 212
Total Questions: 118
Total Answers: 120

Location: Dominica
Member since Mon, Jun 22, 2020
4 Years ago
;