Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-94206

Message box not centered on resized and maximized QMainWindow

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.1.0 , 5.15.2, 6.1.0
    • None
    • Linux 64-bit
      Microsoft Windows 10 Pro 20H2
    • Linux/X11, Windows

    Description

      #include <QApplication> 
      #include <QMainWindow> 
      #include <QMessageBox> 
      
      int main(int argc, char *argv[]) 
      { 
          QApplication a(argc, argv); 
          QMainWindow w; 
          w.resize(800, 600); 
          w.showMaximized(); 
          QMessageBox::question(&w, "Title", "Text", QMessageBox::Yes | QMessageBox::No); 
          return a.exec(); 
      }
      

      The message box is not shown centered on the main window. The issue is a regression from Qt 5.0.2.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              net147 Jonathan Liu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes