I just want to set an event on the yes button of the message box but when I click the yes button it returns me None value and it not satisfies the condition.
def question(self):
msg = QMessageBox()
result = msg.setStandardButtons(msg.Yes | msg.No)
msg.setIcon(msg.Question)
msg.setText(self.text)
msg.setWindowTitle('Console')
if result == msg.Yes:
print('Yes')
msg.exec_()