PDA

View Full Version : Can I use waitForReadyRead in a QThread that belongs to the mainthread?



yodasoda
26th February 2010, 19:01
I have a QThread that contains a QUDPsocket (socket is member not local to QThread::run(), maybe I should change that from what I am reading). This QThread is instantiated in my QMainWindow class ie the GUI thread. Is it still safe to use waitForReadyRead or do I absolutly need to instantiate the QThread in main.cpp directly for it to be thread safe. I am getting intermittent double free exception inside the call to waitForReadyRead in the present way of doing it.