Nevermind, I found how to do it, using a QTimer