When a QDialog has a parent and the dialog is opened, the dialog is always displayed maximized. If the maximum size of the dialog is limited, the dialog is not centered to its patent. It is always displayed at the left upper corner of the screen. That is also valid for the class QMessageBox. That is not the same behavior as on the Linux Desktop/X11, where dialogs are centered and have a reasonable size.