From 5b0945acef6895d4147b81dcda7cdce89c3a981a Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 4 Jan 2010 12:39:25 +0100 Subject: Designer: Selection handles disappear when using style sheet on form. ... that has a white background color. The selection handles inherited the form's stylesheet. Fix by parenting them on the (internal) form container widget. Reviewed-by: Jarek Kobus Task-number: QTBUG-6757 --- tools/designer/src/components/formeditor/widgetselection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/designer/src/components/formeditor/widgetselection.cpp b/tools/designer/src/components/formeditor/widgetselection.cpp index 484e3a9..35f1509 100644 --- a/tools/designer/src/components/formeditor/widgetselection.cpp +++ b/tools/designer/src/components/formeditor/widgetselection.cpp @@ -86,7 +86,7 @@ static inline Layout *managedLayoutOf(const QDesignerFormEditorInterface *core, // ----------- WidgetHandle WidgetHandle::WidgetHandle(FormWindow *parent, WidgetHandle::Type t, WidgetSelection *s) : - InvisibleWidget(parent->mainContainer()), + InvisibleWidget(parent->formContainer()), m_widget(0), m_type(t), m_formWindow( parent), @@ -638,7 +638,7 @@ void WidgetSelection::updateGeometry() return; QPoint p = m_widget->parentWidget()->mapToGlobal(m_widget->pos()); - p = m_formWindow->mapFromGlobal(p); + p = m_formWindow->formContainer()->mapFromGlobal(p); const QRect r(p, m_widget->size()); const int w = 6; -- cgit v0.12