I want to relay/concatenate a signal from an object I put into a QList to its parent to trigger a redraw of the parent object. But where to put the connect()?
Qt Code:
  1. void Desktop::addTray(Tray tray) {
  2. trayList.append(tray);
  3. }
  4.  
  5. void Tray::setColor(int number, QColor color) {
  6. pointList[number].setColor(color);
  7. emit dataChanged();
  8. }
To copy to clipboard, switch view to plain text mode 
If I append a new tray object to the desktop I copy the object not a pointer to it. So If I would write the connect() after line 2, I wouldn’t connect to the object within the trayList.