def empty_selection(): w = QWidget() QMessageBox.critical(w, w.tr("No selection"), w.tr("Your selection is empty!"))