When adding custom buttons to a QMessageBox the return value of exec() as well as result() is not a StandardButton value, but instead an opaque value, and the documentation says to use clickedButton() to determine which button was clicked. Pick-to: 6.6 6.5 Change-Id: Ib47a218989b4dcb5d51f648bc55bc02399bae602 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>