Hi Alan, The code is working now. Thanks, Patrycja
-----Original Message----- From: Tutor [mailto:tutor-bounces+pniewosz=slb....@python.org] On Behalf Of Alan Gauld Sent: Tuesday, January 12, 2016 11:32 AM To: tutor@python.org Subject: Re: [Tutor] Fwd: RE: Thread output to GUI Text Field 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 https://urldefense.proofpoint.com/v2/url?u=http-3A__www.alan-2Dg.me.uk_&d=CwICAg&c=uGuXJ43KPkPWEl2imVFDmZQlhQUET7pVRA2PDIOxgqw&r=VlCD52JbZNT0daOyAL7vAA&m=9SVNfjVnnKpqs4j0eWR3Iq0mcPb4UPVzbrZzb2E_iWU&s=CI27ak-lLYWB8L1KnBOekFfqjOthWxdNFshm-EUmeRg&e= https://urldefense.proofpoint.com/v2/url?u=http-3A__www.amazon.com_author_alan-5Fgauld&d=CwICAg&c=uGuXJ43KPkPWEl2imVFDmZQlhQUET7pVRA2PDIOxgqw&r=VlCD52JbZNT0daOyAL7vAA&m=9SVNfjVnnKpqs4j0eWR3Iq0mcPb4UPVzbrZzb2E_iWU&s=QRRuN9SddMDPZUwUPEfsTRKmBoSE907XCeCbt6_2rOY&e= Follow my photo-blog on Flickr at: https://urldefense.proofpoint.com/v2/url?u=http-3A__www.flickr.com_photos_alangauldphotos&d=CwICAg&c=uGuXJ43KPkPWEl2imVFDmZQlhQUET7pVRA2PDIOxgqw&r=VlCD52JbZNT0daOyAL7vAA&m=9SVNfjVnnKpqs4j0eWR3Iq0mcPb4UPVzbrZzb2E_iWU&s=4b3hD5aM-gpp35f9pcsAjE5a_ZyDoCaxpynaDnVo7Hc&e= _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.python.org_mailman_listinfo_tutor&d=CwICAg&c=uGuXJ43KPkPWEl2imVFDmZQlhQUET7pVRA2PDIOxgqw&r=VlCD52JbZNT0daOyAL7vAA&m=9SVNfjVnnKpqs4j0eWR3Iq0mcPb4UPVzbrZzb2E_iWU&s=NKRcyXW49oaftjEi7LkjX7UPa6HL45Rzv79L6qbsQRg&e= _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor