Forum: GNU Radio QtGui in background or separate thread

40ff8f60ca87d242ef8a9e51b7ffee13?d=identicon&s=25 Victor User (Guest)
on 2013-10-11 22:29
(Received via mailing list)
Hello,

I have a python program that does some signal processing on packets
collected with the USRP and flowgraph. Inside the constructor of my
python class, I create an instance of mytop-block object. I'm trying to
use the QtGui sink to display the spectrum while the processing is going
on. My constructor to my python class looks like:

def __init__(self, **kwargs):
internal variables ....
self._tb= top_block_ctor( **args )
self._tb.start()
self._tb.qapp.exec_()


My problem is the blocking that occurs with the qapp.exec_(). If I
remove that line in my constructor, then my processing works fine
(without the display). If I leave that line, then my spectrum display
works, but I don't start the processing until I close the display. I
know that this is what the 'blocking' should do.

However, I would like it to not block or somehow run in another thread
so that the display is "live" while the processing is going on.

Is there a way to do this? I could not fine any examples on-line.

Thanks
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.