I want to design a program, a sort of game.
I want to use some pictures and when they get clicked replacing them with another picture. I have done this:
void MainWindow:n_pushButton_clicked(bool checked)
{

if(checked)
checked = false;
else
checked = true;

}
The problem that I have is that I want to replace the pictures not only once and back, I want to swap between 4 images. The data when a image is clicked I must send to my main program who does al the calculations if that's legit or not. I also want to update my user interface after my main program has done a few stuff. (input and output)

How should I do this with code or with the user interface... I'm totally new to Qt