Qt Code:
  1. foreach (QString str, msgData) {
  2. QSystemTrayIcon::MessageIcon icon = QSystemTrayIcon::MessageIcon();
  3. this->showMessage(tr("Alert"), str, icon);
  4. sleep(2);
  5. }
To copy to clipboard, switch view to plain text mode 
The above code doesn't display all the message. Only the last alert is visible. How to display all the alerts.