[PyQt] Problem regarding setting text of QTextEdit in a separate thread

Shine Jose shinejose22 at gmail.com
Tue Jul 7 20:58:46 BST 2009


Hello friends,I am writing an application to read data from serial port and
display it on the screen using a QTextEdit widget.  Since I'll have to poll
the serial port to check for arrival of data, I have created the widgets in
the main thread of the program and created a separate thread for reading
data. However when I try to update text of TextEdit using its setText()
method in the new thread, I get the following error:
QObject: Cannot create children for parent that is in different thread

Searching on the net made me realize that setting the text in a separate
thread is not supported in pyQT. Is there any work-around for this problem?
I request you to suggest me any alternative method to find a solution for my
problem.

Thanks for your help.

-- 
Regards,
Shine Jose
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090707/689159b5/attachment.html


More information about the PyQt mailing list