'Delete button clicked'

def delete(self):

    selected = self.file_list.selectedItems()
    for item in selected:
        itemrow = self.file_list.row(item)
        self.file_list.filenames.pop(itemrow)
        self.file_list.takeItem(itemrow)
    self.update()
