Mac: QComboBox wouldn't receive mouse events when shown within a modal dialog

The mouse events were being stolen by the modal dialog, preventing the
combo box to update itself. Key events were being properly forwarded,
but this was probably due to the different way key events are being
delivered.

Change-Id: I5bfc4800fad9fd4122a212e6fdec13811a7e647b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
bb10
Gabriel de Dietrich 2012-10-01 19:16:04 +02:00 committed by The Qt Project
parent 403b15488b
commit afd66b3cb0
1 changed files with 4 additions and 0 deletions

View File

@ -291,6 +291,10 @@ void QCocoaWindow::setVisible(bool visible)
} else {
[m_nsWindow orderFront: nil];
}
// We want the events to properly reach the popup
if (window()->windowType() == Qt::Popup)
[(NSPanel *)m_nsWindow setWorksWhenModal:YES];
}
}
} else {