title: Validate input text in a QPlainTextEdit
body: <p>I am writing a simple editor program. How can I check the input text? For example, when the input contains "print", re-format it (color, bold, etc). How to check it continuously?</p>
  
  <pre><code>def recognizer(self):
      while True:
          if "word" in self.plainTextEdit.toplainText :
              print("True")
  </code></pre>