def show_items(self, cursor, items):
text_edit = self._text_edit<EOL>point = text_edit.cursorRect(cursor).bottomRight()<EOL>point = text_edit.mapToGlobal(point)<EOL>height = self.sizeHint().height()<EOL>screen_rect = QtGui.QApplication.desktop().availableGeometry(self)<EOL>if screen_rect.size().height() - point.y() - height < <NUM_LIT:0>:<EOL><INDENT>point = text_edit.mapToGlobal(text_edit.cursorRect().topRight())<EOL>point.setY(point.y() - height)<EOL><DEDENT>self.move(point)<EOL>self._start_position = cursor.position()<EOL>self.clear()<EOL>self.addItems(items)<EOL>self.setCurrentRow(<NUM_LIT:0>)<EOL>self.show()<EOL>
Shows the completion widget with 'items' at the position specified
            by 'cursor'.