From ba93b6a3401d726e8ba0bca82c144c13406d56a6 Mon Sep 17 00:00:00 2001 From: Thomas McGuire Date: Mon, 16 Jul 2012 10:04:52 +0200 Subject: Blackberry: Apply state from QWidget when creating new QBBWindow Otherwise things like the window position and the parent/child relation were wrong. This is a backport from qtbase commit 095f2d5292ddfb4c77056af89c11327d85af282b. Change-Id: I838a15def49c004d0a0229f208ffa8e4f7aa5216 Reviewed-by: Sean Harmer --- src/plugins/platforms/blackberry/qbbwindow.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/platforms/blackberry/qbbwindow.cpp b/src/plugins/platforms/blackberry/qbbwindow.cpp index 515b6c2..c57c556 100644 --- a/src/plugins/platforms/blackberry/qbbwindow.cpp +++ b/src/plugins/platforms/blackberry/qbbwindow.cpp @@ -121,6 +121,13 @@ QBBWindow::QBBWindow(QWidget *window, screen_context_t context, QBBScreen *scree // Set the screen to the primary display (this is the default specified by screen). setScreen(screen); + + // Qt somtimes doesn't call these setters after creating the window, so we need to do that + // ourselves here + if (window->parentWidget()) + setParent(window->parentWidget()->platformWindow()); + setGeometry(window->geometry()); + setVisible(window->isVisible()); } QBBWindow::~QBBWindow() -- cgit v0.12