Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.14
-
None
-
anrdoid
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"; }
}