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:

Qt Code:
  1. if (ui->leBirth->text() == " / / ")
  2. {
  3. ui->leBirth->clearMask();
  4. ui->leBirth->clear();
  5. }
  6.  
  7. if (ui->lePhone->text() == "( ) - ")
  8. {
  9. ui->lePhone->clearMask();
  10. ui->lePhone->clear();
  11. }
To copy to clipboard, switch view to plain text mode 

Thanks a lot.
Juliano