I have a 10 by 10 grid of frames, i can change their backgrounds withbut that's a lot of code, id like to have a For Loop but i get an error. What am i doing wrong?Code:
ui->box_9_9->setStyleSheet("background-color: rgb(255,0,0)");
Printable View
I have a 10 by 10 grid of frames, i can change their backgrounds withbut that's a lot of code, id like to have a For Loop but i get an error. What am i doing wrong?Code:
ui->box_9_9->setStyleSheet("background-color: rgb(255,0,0)");
that worked for a diagonal line, how do i get it to go row by row or column by column?
Wysota's solution does what your pseudo-code does. Think about what Wysota gave you and adapt.
Two hints: more than one loop, and find a good introductory programming text.