Important: Please read the Qt Code of Conduct -

QMessageBox Align

  • Hi; I want to align QMessageBox on MainWindow. I tried QMessageBox::warning(this, "A", "B").move(0, 0); but it's not working. How can I do it? Thanks.

  • Moderators

    You need to manually create the message box to be able to move it. You won't be able to do it with the static functions. It's a regular dialog window, so look up the docs there should be an example how to show and customize it without resorting to the static function shorthands.

Log in to reply