Popen a QApplication with background QThread

41 views
Skip to first unread message

Juan Cristóbal Quesada

unread,
Jan 12, 2018, 1:00:52 PM1/12/18
to python_in...@googlegroups.com
Hi all,
wonder if anyone has encountered an explanation for this.
I ve got a QApplication in python that runs a background Qthread. When this background QThread finishes it launches another widget, much like a splash screen.
Everything when executed withi python.exe runs correctly: the splash screen shows up with some kind of animation and after the background thread finishes processing the new Windows Widget appears,

Then im trying to call this same QApplication from another script doing a subprocess.Popen/subprocess.check_call and the Splash Screen Gui launches but it remains stuck there and the following widget doesnot appear.

Im guessing the finished signal of the background QThread isnt emitted due to the multiprocessing/multhreading fact but that' s only  a guess.

Any hints on this?

Marcus Ottosson

unread,
Jan 12, 2018, 1:25:01 PM1/12/18
to python_in...@googlegroups.com
I think you'll have to post a short reproducible. Not much to go on here.​

Justin Israel

unread,
Jan 12, 2018, 2:25:50 PM1/12/18
to python_in...@googlegroups.com
Without seeing your code it's only ever going to be a guess, but launching your application through a subprocess shouldn't have any effect on the signals and threads in the new process. 

You should try adding debug print lines to your app to see where it is getting stuck. Does it actually finish its threaded work and emit the signal? 

We would need to see a reproduction to know more. 

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CANOg8wUJqbAZAAFiXJV2hax4CAFbwMTXsPs8Fx8mudEvY%2Ba2tw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages