Unsolved How to check the first character of line from the text file in Qt
-
This post is deleted! -
@sankarapandiyan said in How to check the first character of line from the text file in Qt:
now i want to send the first 3 line to that serial port and the letter start from h means its sends (seria.write ) to another serial port
See QString::startsWith()
-
@Christian-Ehrlicher Yes i want to read line by line first and after that if the string is = h means
its need to write on the another serial port
i tried this code but its not worksQTextStream stream(&inputFile); while(!stream.atEnd()) { QString strline = stream.readLine(); m_lines.append(strline + QString("\r\n")); if QString::stratsWith("h"){ QString strline = stream.readLine(); m_lines.append(strline + QString("\r\n")); } } } checkAndSendData(); }
-
@sankarapandiyan said in How to check the first character of line from the text file in Qt:
i tried this code but its not works
First this code does not compile - so please don't say 'I tried this code' ...
Second - this code does not write anything to any serial port. -
This post is deleted!