Auto close QMessageBox

前端 未结 5 2151
猫巷女王i
猫巷女王i 2020-12-31 19:20

I\'m building a Qt Symbian Project and I want to show a notification for the user that should auto close after some seconds. I have seen that Nokia uses this a lot in their

5条回答
  •  萌比男神i
    2020-12-31 19:39

    Instead you can use Singleshot Timer to close any dialog box or QLabel with much ease:

    QTimer *timer;
    QTimer::singleShot(10000, msgBox, SLOT(close()));
    

提交回复
热议问题