Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
5.1.1, 5.2.0 Beta1
-
None
-
OS X 10.9
Description
Application* applicationInstance = Application::getInstance(); QDialog* dialog = new QDialog(applicationInstance->getWindow()); dialog->setWindowTitle("Login"); QBoxLayout* layout = new QBoxLayout(QBoxLayout::TopToBottom); dialog->setLayout(layout); QFormLayout* form = new QFormLayout(); layout->addLayout(form, 1); QString username = applicationInstance->getProfile()->getUsername(); QLineEdit* usernameLineEdit = new QLineEdit(username); usernameLineEdit->setMinimumWidth(QLINE_MINIMUM_WIDTH); form->addRow("Username:", usernameLineEdit); QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); dialog->connect(buttons, SIGNAL(accepted()), SLOT(accept())); dialog->connect(buttons, SIGNAL(rejected()), SLOT(reject())); layout->addWidget(buttons); int ret = dialog->exec(); if (ret == QDialog::Accepted) { if (usernameLineEdit->text() != username) { // there has been a username change // ask for a profile reset with the new username applicationInstance->resetProfile(usernameLineEdit->text()); } } delete dialog;
The dialog created by the above code, when closed via ESC or Return causes the Application to stop receiving multi-touch events (from a bluetooth magic trackpad or the embedded trackpad in Macbook Pro). This does not occur if the dialog is closed using the buttons on it.
If the dialog is re-opened and then closed with the buttons the multi-touch works again (suggesting that something in the cleanup routine of having been closed this way kicks it back into the right state).
Also tested with a very simple QMessageBox and experienced the same behaviour, so this does not appear to be specific to QDialog.
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-34577 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
70446,3 | Synthesize an enter event when a modal dialog is dismissed | stable | qt/qtbase | Status: ABANDONED | -1 | 0 |