Reading last lines from QTextEdit Document
Hi I have a QtextEdit control, in which a user can type in text, what I want to do is read the last 100 lines of text that has been entered.
i.e. whenever the user presses the [ENTER] key, I want to read/get the last 100 lines of text from the bottom of the QTextEdit control.
Any suggestions on reading from the bottom of the QtextDocument?
Re: Reading last lines from QTextEdit Document
you split the text at the new line in a stringlist and the function size()
shows you the number of lines, then you can read the last 100 lines.