Search code examples
c++qtqtextedit

How do I Implement the length in textEdit?


I want to count the total characters with spaces and total characters without spaces in textEdit. I understand that there's a length property in qt.


Solution

  • Wouldn't you just invoke toPlainText on the QTextEdit control and use the returned QString to get the length and character counts you need?