Hello everyone, i'm trying to develop an program that validate a string that will have just numbers, but to do this i need to make the string become an int number array, i'm using a mask that just allows the user to insert numbers, and i replaced all special characters like "." , "-" that i used in the mask and my string now is just numbers.

Like the code:

Qt Code:
  1. ui->lineEdit->setInputMask("000.000.000-00");
  2.  
  3. QString cpf = ui->lineEdit->text();
  4. cpf.replace(".","");
  5. cpf.replace("-","");
To copy to clipboard, switch view to plain text mode 

Please help me make my string become an int array, because i need to work with each number at a time to compare them and validate the whole number!

Thank you very much!