showMessageBoxSync

the index of the clicked button.

Shows a message box, it will block the process until the message box is closed. It returns the index of the clicked button.

The window argument allows the dialog to attach itself to a parent window, making it modal. If window is not shown dialog will not be attached to it. In such case it will be displayed as an independent window.