Base your class on QWidget or QDialog.
Include in it a QTimer variable.
In the constructor link the timer's timeout() signal to whatever action you wish (close, hide, move...).
Start your timer with your desired time value (timer->start(millisecs)).
Etc...