Fix Lesson 8 Task 1
This commit is contained in:
parent
b78ea4318e
commit
27d99acbcb
2 changed files with 10 additions and 2 deletions
|
@ -32,13 +32,21 @@ void LlmMathQuiz::submit()
|
|||
ui->l_match->setText("False");
|
||||
|
||||
ui->b_generate->setEnabled(true);
|
||||
|
||||
if (ui->l_number->text().toInt() == 10)
|
||||
ui->l_score->setText("Final score:");
|
||||
}
|
||||
|
||||
void LlmMathQuiz::generate()
|
||||
{
|
||||
if (m_taskReceived) {
|
||||
ui->l_number->setText(QString::number(ui->l_number->text().toInt() + 1));
|
||||
m_taskReceived = false;
|
||||
if (ui->l_number->text().toInt() == 10) {
|
||||
ui->l_number->setText(QString::number(0));
|
||||
ui->l_matched->setText(QString::number(0));
|
||||
ui->l_score->setText("Answers matched:");
|
||||
} else
|
||||
ui->l_number->setText(QString::number(ui->l_number->text().toInt() + 1));
|
||||
}
|
||||
m_taskReceived = false;
|
||||
ui->b_generate->setEnabled(false);
|
||||
|
|
|
@ -128,7 +128,7 @@
|
|||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<widget class="QLabel" name="l_score">
|
||||
<property name="text">
|
||||
<string>Answers matched:</string>
|
||||
</property>
|
||||
|
|
Reference in a new issue