title: How to emit QTextTexid::textChanged signal only in certain cases selectively?
body: <p>Can you trigger the textChanged signal only for certain cases? for example triggering it for inserted text, inserted space characters but not backspace?</p>
  <p>I am running checks for typed characters inside a QTextEdit every time the text changes and based on the results highlighting text inside a read-only QTextEdit in the background used as an always-on placeholder text for the user to look at while typing. If the user makes a mistake the character gets highlighted red and reset to it's initial background color after the mistake is fixed. The problem arises when the backspace key is pressed, as it is registered as a mistake and as a result the previous character also gets highlighted red.</p>
  <pre><code> void Widget::onTextChanged()
   {
       QChar c;
  
       QString txt_contents = txtedit_-&gt;toPlainText();
  
       if(txt_contents.isEmpty()){
           c = '\0';
  
           //reset text display
           txtdisplay_-&gt;clear();
           txtdisplay_-&gt;append(*label_text_);
       }
       else
           c = txtedit_-&gt;toPlainText().back();
    
       if(!texteditq_-&gt;isEmpty()){
           if(c == texteditq_-&gt;head()){
               //refresh text display
               correct_++;
               txtdisplay_-&gt;clear();
               txtdisplay_-&gt;append(*label_text_);
  
               //remove character that was used for the successful check from the
               //queue
               texteditq_-&gt;dequeue();
           }else{
               //set backgroud color to red for errors
               fmt_-&gt;setBackground(Qt::red);
  
               if(!txtedit_-&gt;toPlainText().isEmpty()){
                   //move cursor to the end of the editor, where the error is and save
                   //the position the error occurs at
                   c_edit_-&gt;movePosition(QTextCursor::End);
                   quint32 error_pos = c_edit_-&gt;position();
  
                   //move the cursor in the display for the background text and
                   //use the KeepAnchor move mode to highlight the misspelled char
                   c_display_-&gt;setPosition(error_pos-1,QTextCursor::MoveAnchor);
                   c_display_-&gt;setPosition(error_pos,QTextCursor::KeepAnchor);
  
                   //apply formating to that character
                   c_display_-&gt;setCharFormat(*fmt_);
               }
           }
       }
   }
  </code></pre>