title: Getting only the visible text from a QTextEdit widget
body: <p>I have been searching for a day and not found an answer to this.
  This thread <a href="https://stackoverflow.com/questions/4559341/how-do-i-get-the-currently-visible-text-from-a-qtextedit-or-qplaintextedit-widge">How do I get the currently visible text from a QTextEdit or QPlainTextEdit widget?</a> merely answers how to get ALL the text contained in the widget.</p>
  
  <p>In my situation, I have a QTextWidget with a lot of text. Much more than can be displayed at any one time. I would like to respond to the visible text changing and then take some actions.</p>
  
  <p>When a user scrolls the text area or new text is added to the widget, I would like to take some action on the visible text. I can easily connect to a signal from the QTextEdit::verticalScrollBar() but how to find what the visible text is?</p>
  
  <p>I have this so far but after reading pages and pages of documentation it seems like QTextEdit doesn't have any method to let you know what the text in it's visible area is.</p>
  
  <pre><code> void MyProject::on_textEdit_scrollBar_valueChanged(int value)
   {
      QStringList visibleText = // how do I do this?
   }
  </code></pre>