[Tutor] Fwd: RE: Thread output to GUI Text Field
Alan Gauld
alan.gauld at btinternet.com
Tue Jan 12 06:32:17 EST 2016
On 12/01/16 09:44, Alan Gauld wrote:
> You didn't mention earlier that you were using threads!
> That significantly complicates matters.
Apologies, I just noticed that the subject line does,
although it wasn't clear that you were trying to output
between threads.
> I have found that I need to use slots and signal to pass data between Threads and hence
Does that mean you have solved the problem?
Or are you still looking for help?
If so what exactly do you want to know?
Do you have some code that doesn't work for example?
> class Panel(QtGui.QWidget):
> def __init__(self,master,parent=None):
> .....
> .....
> self.initUI()
>
>
> def initUI(self):
> #Build layout
> self.tcpControlMessages = QtGui.QPlainTextEdit()
>
> def startThreadedProcess(self):
> self. tcpControlMessage.clear()
> self.thread.start()
>
> @QtCore.Slot()
> def updateMessages(self, message):
> print message
> self. tcpControlMessages.appendPlainText(message)
We can help with the threading aspects but for Qt specifics
you will probably do better on a PyQt forum.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list