[英]Qt Login Timeout Using QTimer
當用戶名/密碼輸入錯誤時間過多時,我正在嘗試實現登錄超時。 但是我做不到。 我的代碼如下
ui->label->setText("Password entered wrong too many times, entered 10 minute cooldown period");
QTimer *timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(update()));
timer->start(6000);
ui->pushButton->setVisible(false);
if(!timer->isActive())
ui->pushButton->setVisible(true);
嘗試這個
ui->pushButton->hide();
QTimer::singleShot(5000, ui->pushButton, SLOT(show()));
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.