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

Appearing of QMessageBox brings the minimized application to foreground

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.11.1
    • None
    • Linux CentOS release 6.6
    • Linux/X11

    Description

      Starting with Qt5, when the message box dialog appears while the application is minimized, the application window is made the front-most one (i.e. the application is brought to foreground). With Qt4, the application window did not show up.

      Steps to reproduce:

      1. Run the below program
      2. Minimize the application window
      3. The message box will appear after a few seconds

      Result: The application window will show up along with the message box

      Expected result: The application window does not show up

      #include <QApplication>
      #include <QMessageBox>
      #include <QTimer>
      
      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
      
          auto window = new QWidget;
      
          QMessageBox msgBox(window);
          msgBox.setText("Message Box");
          QTimer::singleShot(5000, &msgBox, &QMessageBox::exec);
      
          window->show();
      
          return QApplication::exec();
      }
      

       

      Attachments

        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
            lmanukyan lmanukyan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes