QString userentry = ui->lineEdit->text();.

Now i need to loop through each character of the string and find the a matching charecter "A"

for(i=0;i<=20;i++)
{
if( userentry[i] == 'A' )
.............

}

I am getting error