[Solved] How to compare data read from process->readAllStandardOutput() with a string
General and Desktop
12
Posts
3
Posters
3.5k
Views
1
Watching
-
Hi,
You should rather use QString. It has all the function needed for what you want
-
Did you simply check/print the content of b1 ? You might have more data than you think.
-
if the condition fails it means they are not the same. Maybe a control char like \n that you did not see.
-
Can you post the exact content of b1 ?
And the code using QString for the comparison ? -
please given the result of
qDebug()<<b1.toHex();
and
qDebug()<<QByteArray(text).toHex();
-
Could you share the solution ?
Since you got it working, please update the thread title prepending [solved] so other forum users may know that it is working now :)