Hello I am trying to figure out how to get data from my worker class. I have server code running as a threaded process and I want to send some data from my server to the pyQT GUI
I have a variable in my gui code
self.mytext = QTextEdit()
and in my server code I send the data to the GUI. Only problem is I don’t know how to set up the Signals to do this right 😛
self.emit(SIGNAL('mytext'), mytext.setText(msg))
Any ideas how to do this 🙂
*cheers
First, have look at how Signals/Slots concept works. Original Qt documentation for is a good start. Then if you are working with PyQt 4.5+, try to use the new style signals and slots. They are more Pythonic.
Here is how a small example might work (omitting the obvious parts).