I want to send multiple CAN signals of type QCanBusFrame. Currently, I can send one signal at a time and it can run till the signal cycle length. I want to send multiple signals at the same time and receive their output. Currently, if I send a second signal, it goes into a loop and I have to wait until the first signal end to get the output of the second signal. Can anyone help me with this problem?

Should I use multithreading to get output in GUI?

This is an excerpt of sending signals :

Qt Code:
  1. foreach(QString payload_id, payload_send_final) {
  2. const QByteArray payload = QByteArray::fromHex(payload_id.remove(QLatin1Char(' ')).toLatin1());
  3. frame = QCanBusFrame(frameId, payload);
  4.  
  5. if(m_ui->cycle_check->isChecked())
  6. emit sendFrame(frame,cycle_len.at(i));
  7. else
  8. emit sendFrame(frame,"1");
  9.  
  10. i = i + 1;
  11. }
To copy to clipboard, switch view to plain text mode 


and receiving part is connected with the "connect" statement to the below slot:

Qt Code:
  1. void MainWindow::sendFrame(const QCanBusFrame &frame,QString cycle)
  2. {
  3.  
  4. if (!m_canDevice)
  5. return;
  6.  
  7. m_frame_list.enqueue(frame);
  8. send_frame_str = frame.toString();
  9. int i = 1;
  10.  
  11. while (!m_frame_list.isEmpty()) {
  12. QCanBusFrame m_frame = m_frame_list.dequeue();
  13. while ( i <= cycle.toInt()) {
  14. m_canDevice->writeFrame(frame);
  15. delay(5500);
  16. i = i+1;
  17. }
  18. }
  19. }
To copy to clipboard, switch view to plain text mode 

Please help me with suggestions?
Thanks in advance