hello buddies,
I have 2 lineedits with mask, one with phone mask an another with birthday mask.
these two fields aren't required fields, so how can i prevent to insert in db only the mask when the user do not fill these fields?
I tryed this before my insertRecord, but do not work:
if (ui->leBirth->text() == " / / ")
{
ui->leBirth->clearMask();
ui->leBirth->clear();
}
if (ui->lePhone->text() == "( ) - ")
{
ui->lePhone->clearMask();
ui->lePhone->clear();
}
if (ui->leBirth->text() == " / / ")
{
ui->leBirth->clearMask();
ui->leBirth->clear();
}
if (ui->lePhone->text() == "( ) - ")
{
ui->lePhone->clearMask();
ui->lePhone->clear();
}
To copy to clipboard, switch view to plain text mode
Thanks a lot.
Juliano
Bookmarks