fix QWidget::activateWindow for child widgets

For child widgets we must use the windowHandle of the toplevel widget.

Change-Id: If7bad8ed4bba694806a2c8b77bae3d25cc200b8b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
Joerg Bornemann 2012-07-31 11:43:15 +02:00 committed by Qt by Nokia
parent 0d8795fcb4
commit f6169ae4b1

View File

@ -439,8 +439,10 @@ QWidget *QWidget::keyboardGrabber()
void QWidget::activateWindow()
{
if (windowHandle())
windowHandle()->requestActivateWindow();
QWindow *const wnd = window()->windowHandle();
if (wnd)
wnd->requestActivateWindow();
}
// Position top level windows at the center, avoid showing