I wrote opening file and showing subject of file in textedit - function:
Qt Code:
void MyWindow::Open () { if (!nameFile.isEmpty ()) { { textEdit1 -> setPlainText (in.readAll ()); file.close(); } } }To copy to clipboard, switch view to plain text mode
But I want to take one line of text. How can I take one line of text ? Because I want to sort lines of text, for example - first:
bbb bbb aaa
bbb aaa cc
aaa gg
Then it will be:
aaa gg
bbb aaa cc
bbb bbb aaa
I need to take one line of text - here it is "bbb bbb aaa", then I will trow it into vector (from library STL from c++), then I will use function sort() (from library STL from c++) and I will get sorted lines of text.
BUT HOW CAN I TAKE ONE LINE OF TEXT FROM FILE ?
Bookmarks