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

on android call QDialog::reject() do not return from QDialog::exec()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.14
    • None
    • anrdoid
    • Android

    Description

      The code is as follows, my expectation is to click the button to pop up a message box, if the button is not clicked for more than 3 seconds, it will automatically close, but when the message box is closed after 3 seconds, the msgBox.exec method does not return, that is, qDebug()<<"bbb" does not run after message box closed. This problem is only on android, not on windows.

      void MainWindow::on_pushButton_clicked()
      {
         msgBox.setInformativeText("Do you want to save your changes?");
         msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);              
         msgBox.setDefaultButton(QMessageBox::Save);
         QTimer::singleShot(3000, &msgBox, SLOT(reject())); qDebug() << "aaa";
         msgBox.exec();
         qDebug() << "bbb";
      }
      

      }

      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
            mrzz Joye Tribe
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes