Here it is:
Qt Code:
int number_of_lines = l.size();To copy to clipboard, switch view to plain text mode
Here it is:
Qt Code:
int number_of_lines = l.size();To copy to clipboard, switch view to plain text mode
Thanks, but, doesn't work in my case, I need lines not paragraphes and those are not visible characters.
In QTextDocument, the paragraph is the single line (not wrapped). Paragraphs are the lines that internally separated by QChar::ParagraphSeparator instead of \n. So getting the number of paragraphs, you'll get the count of lines.
Bookmarks