code: def placeCursor(self, pos):
          
          if pos > len(self.qteWidget.toPlainText()):
              pos = len(self.qteWidget.toPlainText())
  
          tc = self.qteWidget.textCursor()
          tc.setPosition(pos)
          self.qteWidget.setTextCursor(tc)
docs: Try to place the cursor in ``line`` at ``col`` if possible.
          If this is not possible, then place it at the end.