hi every one i am working on qt creator. i have a li开发者_如何学Gost which is loaded with values store in a file when i run the program. but my problem is that the file is updating continuously after 30 sec so i want to refresh my list again with new values after 30 sec. how can i do that as sleep function is not working
i want that after running my program my list get updated
thanks
example:
QTimer *reloadTimer = new QTimer(this);
connect(reloadTimer, SIGNAL(timeout()), this, SLOT(reloadTheList()));
reloadTimer->start(30000);
given a member function this.reloadTheList()
, this code (eg. when run in constructor) tells the QTimer to emit timeout()
every 30 seconds (30k miliseconds), which you connected to signal reloadTheList()
精彩评论