4
I have the following situation:
I have to repaint the screen every little while so that objects on the screen move on their own, but this has to occur so that the program does not lock.
I tried to make a Thread and call the update method but the screen is white, all locked.
Basically, I need this to occur at each specific time, but that does not influence the after processes of the program (such as keyboard and mouse events).
void atualizar(){
X = X - 20;
repaint();
}
I believe that the best is with Thread, but I could not implement in the right way, even following the official QT documentation.
Another point, when trying to do with Thread the painting event ends up being called twice, occurring in crash in the program.
Very good your answer. I am very grateful to have solved my problem.
– Giovani