Hi sabbu,

You can try it :

Qt Code:
  1. bool convertOK;
  2. unsigned long int n = ui->lineEdit()->text().toULong(&convertOK);
  3. if(!convertOK) return -1;
To copy to clipboard, switch view to plain text mode