code: def toggle_word_wrap(self):
          
  
          self.setWordWrapMode(not self.wordWrapMode() and QTextOption.WordWrap or QTextOption.NoWrap)
          return True
docs: Toggles document word wrap.
  
          :return: Method success.
          :rtype: bool