I'm going to display some information in my Qt appliction using QTextEdit or QPlainTextEdit. When there are too many lines in the widget, I want to delete the first line in the QTextEdit conponent. Can anyone help? Thank you !!!
I'm going to display some information in my Qt appliction using QTextEdit or QPlainTextEdit. When there are too many lines in the widget, I want to delete the first line in the QTextEdit conponent. Can anyone help? Thank you !!!
Do you want to judge lines based on line wrap or by newline characters?
My guess is you're going to have to keep a track of the number of newline characters and then once you reach your limit erase from the start until you hit a newline.
Bookmarks