title: PyQt: QDialogButtonBox with 3 options
body: <p>I'm trying to create an alert for a user via a three button dialog box asking if they'd like to save their changes or not, or just cancel out of the operation altogether. I can manage the yes and the canceling out, but the 'don't save' option isn't working. Here is what I have:  </p>
  
  <pre><code>import logging
  import Qt
  # from functools import wraps
  from Qt import QtGui, QtCore, QtWidgets
  
  dialog = QtWidgets.QDialog() #parent=parent)
  dialog.setWindowTitle("Foo")
  dialog.verticalLayout = QtWidgets.QVBoxLayout(dialog)
  
  # Create the dialogs main message (Qlabel)
  dialog.label = QtWidgets.QLabel(dialog)
  dialog.label.setAlignment(QtCore.Qt.AlignCenter)
  dialog.label.setTextInteractionFlags(dialog.label.textInteractionFlags() | QtCore.Qt.TextBrowserInteraction)
  dialog.label.setTextFormat(QtCore.Qt.RichText)
  dialog.label.setOpenExternalLinks(True)
  dialog.label.setText("Magoo?")
  dialog.verticalLayout.addWidget(dialog.label)
  
  dialog.widget = QtWidgets.QWidget(dialog)
  dialog.horizontalLayout = QtWidgets.QHBoxLayout(dialog.widget)
  dialog.horizontalLayout.setContentsMargins(-1, -1, -1, 0)
  dialog.horizontalLayout.setObjectName("horizontalLayout")
  dialog.verticalLayout.addWidget(dialog.widget)
  
  # Create the buttonbox with options
  dialog.buttonBox = QtWidgets.QDialogButtonBox(dialog.widget)
  dialog.buttonBox.setOrientation(QtCore.Qt.Horizontal)
  dialog.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Discard | QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Yes)
  dialog.horizontalLayout.addWidget(dialog.buttonBox)
  
  # Connect the buttonbox signals
  dialog.buttonBox.accepted.connect(dialog.accept)
  dialog.buttonBox.rejected.connect(dialog.reject)
  QtCore.QMetaObject.connectSlotsByName(dialog)
  
  # Resize the dialog box to scale to its contents
  dialog.adjustSize()
  
  # Launch the dialog
  yes = dialog.exec_()
  dont_notify_again = dialog.checkBox.isChecked()
  </code></pre>
  
  <p>I am probably missing what the connection to the signals should be, but I'm not sure what those are.</p>