В чём дело непонятно. Даже если параметры не нравятся ошибки сегментации быть не должно.
Вы документацию что ли прочтите:
StandardButton QMessageBox::question ( QWidget * parent, const QString & title, const QString & text, StandardButtons buttons = Ok, StandardButton defaultButton = NoButton ) Opens a question message box with the specified title and text. The standard buttons are added to the message box. defaultButton specifies the button used when Enter is pressed.defaultButton must refer to a button that was given in buttons.If defaultButton is QMessageBox::NoButton, QMessageBox chooses a suitable default automatically.
А вы что пишете?
int r = QMessageBox::question( this, tr("Do"), tr("Exit"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Cancel | QMessageBox::Escape);
В то время когда надо: QMessageBox::StandardButton r = QMessageBox::question( this, tr("Do"), tr("Exit"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);