I have a 10 by 10 grid of frames, i can change their backgrounds with
Qt Code:
  1. ui->box_9_9->setStyleSheet("background-color: rgb(255,0,0)");
To copy to clipboard, switch view to plain text mode 
but that's a lot of code, id like to have a For Loop
Qt Code:
  1. int count;
  2. QString boxnum;
  3. for (count = 0; count <= 10; count++)
  4. {
  5. boxnum += "box_";
  6. boxnum += QString::number(count);
  7. boxnum += "_";
  8. boxnum += QString::number(count);
  9. ui->boxnum->setStyleSheet("background-color: rgb(255,0,0)");
  10. }
To copy to clipboard, switch view to plain text mode 
but i get an error. What am i doing wrong?