Commit 40683aaa authored by Alessandro Portale's avatar Alessandro Portale

TextEditor: Prevent flashing window when switching to QML outline

The reason for the flashing is that the toolbuttons in the toolbar are
constructed without initial parent. The Filter toolbutton is set to
visible before it is parented, and therefore it creates a top-level
window. Milliseconds later it gets a parent and the window disappears.

Task-number: QTCREATORBUG-18823
Change-Id: Ide100d9117484131007a4d4d2e584d0967aa7377
Reviewed-by: Eike Ziller's avatarEike Ziller <>
parent 7f68088f
......@@ -62,7 +62,11 @@ OutlineWidgetStack::OutlineWidgetStack(OutlineFactory *factory) :
connect(m_toggleSync, &QAbstractButton::clicked,
this, &OutlineWidgetStack::toggleCursorSynchronization);
m_filterButton = new QToolButton;
m_filterButton = new QToolButton(this);
// The ToolButton needs a parent because updateFilterMenu() sets
// it visible. That would open a top-level window if the button
// did not have a parent in that moment.
m_filterButton->setToolTip(tr("Filter tree"));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment