我尝试在用户名/密码输入错误太多时间时实施登录超时。但我无法这样做。我的代码在
之下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);
答案 0 :(得分:0)
试试这个
ui->pushButton->hide();
QTimer::singleShot(5000, ui->pushButton, SLOT(show()));