def insertCompletion(self, completion): CompletionTextEdit.insertCompletion(self, completion) self.textCursor().insertText("\n")
def __init__(self, parent=None): self.known_drugs = [] CompletionTextEdit.__init__(self, parent)
def setText(self, text): LOGGER.debug("setting text %s", text) CompletionTextEdit.setText(self, text.strip("\n").title()) cursor = self.textCursor() cursor.movePosition(cursor.End, cursor.MoveAnchor) self.setTextCursor(cursor)