Answer the question
In order to leave comments, you need to log in
How to increment a counter in qt?
There is a code
int page = 0;
int count = 2;
if (ui->lineEdit->text().toDouble() == answers[page].getA())
{
ui->textBrowser_2->clear();
ui->textBrowser_2->append(tasks[page+1]);
QString str = QString::number(count);
ui->label->setText(QString(str + "/5"));
wins++;
}
else
{
ui->textBrowser_2->clear();
ui->textBrowser_2->append(tasks[page+1]);
QString str = QString::number(count);
ui->label->setText(QString(str + "/5"));
fail++;
}
page++;
qDebug() << page;
}
Answer the question
In order to leave comments, you need to log in
At a minimum, you need to make page and count fields of the class.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question