I have a QT based application that has been running for several years using Windows. It opens 3 different UDP sockets, connects the readyRead signal to a slot, and parses the data from all three. I have had no troubles with this part of the application at all.
I recently ported it to OS X, using QT 5.4. It appears to run fine until I minimize the application using the little orange button on the title bar. When I restore it, only one of the sockets continues to receive data. I have verified that the data is still being sent to the socket--it's just not triggering readyRead.
If I restart, all is fine.
The one difference between the working socket and the others is that the working one is connected to a device that must be prompted, so at 1 Hz I write to the socket. The other sockets have should spit data without being prompted.
I did try sending data to them anyway, just to make sure the socket wasnt hanging up at the OS level somehow, but it made no difference. Nothing has made a difference in fact. Each socket is opened the same way--I create the socket, bind it to a port number, and connect it to a slot.
altitudeSocket = new QUdpSocket(this);
altitudeSocket->bind(altitudeInSocketNumber);
connect (altitudeSocket,SIGNAL(readyRead()),this,SLOT(sledSocketDataPending()));
switchSocket = new QUdpSocket(this);
switchSocket->bind(switchInSocketNumber);
connect (switchSocket, SIGNAL(readyRead()),this,SLOT(sledSocketDataPending()));
depthSocket = new QUdpSocket(this);
depthSocket->bind(depthInSocketNumber);
connect (depthSocket, SIGNAL(readyRead()),this,SLOT(sledSocketDataPending()));
Is there something special I need to do in OS X programming to handle window minimization?