While trying to do something like this:
connect(process1, SIGNAL(waitForReadyRead()), this, SLOT(dataReceived_1()));
i have way too many processes for signals. I have created a QList with all those processes (objects).
In order to simplify the code, i wanted to put this connect in a loop and perform this signal slot connection by iterating through the processList.
Something like this:
for(int i=0; i<procList.length(); ++i){
connect(procList[i], SIGNAL(waitForReadyRead()), this, SLOT(data_rcvd[i]));
}
Here data_rcvd
is a QList containing the slot functions.~
but unfortunately we can not add functions inside QList. So i want to know, is there a possibility to define function pointers to achieve this task???
Or you think, i create a new QProcess class (extend) and overload the function waitForReadyRead() to emit a pointer containing this specific information maybe?