I learn PyQt5 (which looks quite complicated for me) and I am wondering why QMessageBox.Yes(or no) has some special value, for me it is 16384. That is what I mean:
from PyQt5 import QApplication, QWidget, QMessageBox
class App(QWidget):
def message_box(self):
resp = QMessageBox.question(self, 'foo', 'bar', QMessageBox.Yes | QMessageBox.No, QMessageBox.No)
print(resp)
It prints 16384 (if you click Yes) or 65536 (if you click No), why not True or False? I understand that I can compare it later to QMessageBox.Yes or QMessageBox.No, but I am wondering where are that magic values from and why they are used?