Important: Please read the Qt Code of Conduct -

QMessageBox does not open centered on Mac OS X (Qt 4.8.5)

  • Hello,

    this is only a minor issue:

    When you open a QMessageBox, it is not centered relative to the parent on Mac OS X.
    On Windows it is centered.

    Here is the code I used:

    @QMessageBox box(this);
    box.setText("This is a message box!");

    And there is another small issue:
    The text displayed within the message box is bold. Even if it is not supposed to be.
    This is also different on Windows.

    Does anybody have a workaround for this?


  • I would fetch the parent window-position and calculate the center-position and set it via move ("Move...": You can calc the position by subtracting your widgets geometry.

Log in to reply