pyside6 pyqt6 is not accepting the instanced variables when defining the button roles.
test = QtWidgets.QDialogButtonBox()
# this is not working on pyside6 anymore
test.addButton("Apply", test .ApplyRole)
# it needs to be set like this:
test.addButton("Apply", QtWidgets.QDialogButtonBox.ApplyRole)