code: def set_content(self, content):
          
  
          cursor = self.textCursor()
          cursor.movePosition(QTextCursor.Start, QTextCursor.MoveAnchor)
          cursor.movePosition(QTextCursor.End, QTextCursor.KeepAnchor)
          cursor.removeSelectedText()
          for line in content:
              self.moveCursor(QTextCursor.End)
              self.insertPlainText(line)
          return True
docs: Sets document with given content while providing undo capability.
  
          :param content: Content to set.
          :type content: list
          :return: Method success.
          :rtype: bool