'Handle clicking of an item.
Args:
index: The QModelIndex of the clicked item.'

@pyqtSlot('QModelIndex')
def on_clicked(self, index):

    if (not index.isValid()):
        return
    item = self.model().data(index, downloads.ModelRole.item)
    if (item.done and item.successful):
        item.open_file()
        item.remove()
