Responsive Ad Area

Share This Post

test

how to read only one line in a text file which has particular word using Qt

i am reading a txt file, want to read only 1 line with particular word. i m using qt creator.

 QFile file("/home/sahar/Desktop/medtronic/SpineIMU00.txt");
 if (!file.open(QFile::ReadOnly | QFile::Text)) {
     QMessageBox::warning(this,"title","file not open");
 }
 QTextStream in(&file);
 QString text = in.readAll();
 ui->plainTextEdit->setPlainText(text);
 file.close();


how to read only one line in a text file which has particular word using Qt
how to read only one line in a text file which has particular word using Qt
test
{$excerpt:n}

Share This Post

Leave a Reply

Your email address will not be Publishedd. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Skip to toolbar