def no_device(): w = QWidget() QMessageBox.critical(w, w.tr("No devices"), w.tr("You have to choose at least one available " "device in Edit->Options->Device."))