diff options
author | Gabriel de Dietrich <gabriel.dedietrich@digia.com> | 2012-11-22 15:56:48 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-22 17:42:32 +0100 |
commit | 127c30cbef6800184f4681158f7b3e17fca3cccd (patch) | |
tree | f582ff2ae940506efa940bff5b3717e1d1e222b1 /src/plugins/platforms | |
parent | aba0e53db9cdb7c4c762e567190b039d78b2123f (diff) |
Cocoa: Properly set QNSView's geometry when it's a subview
Task-number: QTBUG-26960
Change-Id: Ib8ca76572c868305f378d22c21d13511b4999244
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index d17df81011..321c0ead4c 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -637,6 +637,9 @@ void QCocoaWindow::recreateWindow(const QPlatformWindow *parentWindow) // Child windows have no NSWindow, link the NSViews instead. const QCocoaWindow *parentCococaWindow = static_cast<const QCocoaWindow *>(parentWindow); [parentCococaWindow->m_contentView addSubview : m_contentView]; + QRect rect = window()->geometry(); + NSRect frame = NSMakeRect(rect.x(), rect.y(), rect.width(), rect.height()); + [m_contentView setFrame:frame]; } } |