Code: void MainWindow::on_line_edit_font1_editingFinished() { if ( user inputted seven characters, which is valid ) { // do something with the valid input } elseif ( user inputted only four characters which is INVALID ) { // tell user he's bad and he should write only valid things... } }
void MainWindow::on_line_edit_font1_editingFinished() { if ( user inputted seven characters, which is valid ) { // do something with the valid input } elseif ( user inputted only four characters which is INVALID ) { // tell user he's bad and he should write only valid things... } }
if (ui->line_edit_font1->text().length() == 7) { // do something with the valid input } elseif (ui->line_edit_font1->text().length() == 4) { // tell user he's bad and he should write only valid things... }