I have to compare two Qstrings in qt,
say,
Qstring str1="1005",str2="1006";
I have tried using ,
if(str1==str2){
return true;
}
&
if(str1.compare(str2)==0)
{
return true;
}
still both methods goes inside if condition & returns true.
You can use :
int x = QString::compare(str1, str2, Qt::CaseInsensitive); // if strings are equal x should return 0