Hello
I want to make a warning message when the user does not enter all the variables??
I have used this method, But it did not work.
try
{
bool ok;
int id = ui->lineEdit->text().toInt(&ok,10);
int Name= ui->lineEdit_2->text().toInt(&ok,10);
int M_Case = ui->lineEdit_3->text().toInt(&ok,10);
}
catch (std::exception& e) {
}
try
{
bool ok;
int id = ui->lineEdit->text().toInt(&ok,10);
int Name= ui->lineEdit_2->text().toInt(&ok,10);
int M_Case = ui->lineEdit_3->text().toInt(&ok,10);
}
catch (std::exception& e) {
QMessageBox::critical(NULL, QString("Error"),QString("You must enter all the variables id, Name and M_Case "));
}
To copy to clipboard, switch view to plain text mode
Bookmarks