From 0150cd3617bca177ecfbd65379c8c0ed6e2fe6ed Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Fri, 11 Dec 2015 22:28:57 +0100 Subject: [PATCH] QCocoaWindow - resize embedded views MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit when QCocoaWindow::setCocoaGeometry is called on windows embedded into a native cocoa gui, QPlatformWindow::setGeometry does not apply the geometry. we therefore need to set the frame on the embedded view manually. related tasks: Task-number: QTBUG-47632 Task-number: QTBUG-45269 Change-Id: I976e4606d36bb4afc74b0834105bceab8a6f8cbd Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qcocoawindow.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 5a59a842c6..3b5909a37e 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -503,7 +503,11 @@ void QCocoaWindow::setCocoaGeometry(const QRect &rect) QMacAutoReleasePool pool; if (m_contentViewIsEmbedded) { - QPlatformWindow::setGeometry(rect); + if (m_qtView) { + [m_qtView setFrame:NSMakeRect(0, 0, rect.width(), rect.height())]; + } else { + QPlatformWindow::setGeometry(rect); + } return; }