<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_content(self, content):
 """ Sets document with given content while providing undo capability. :param content: Content to set. :type content: list :return: Method success. :rtype: bool """


        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