Commit 374bedfb authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.StatesEditor: create widget on demand

Otherwise the widget is created but never inserted in the widget
hierarchy, if the designer was never activated.
In this case the widget was not deleted.

Task-number: QTCREATORBUG-10169

Change-Id: Ic86d540a7044c07e272357edafd4d2f81fd1b7a4
Reviewed-by: default avatarMarco Bubke <>
parent 062f6bac
......@@ -52,7 +52,6 @@ namespace QmlDesigner {
StatesEditorView::StatesEditorView(QObject *parent) :
m_statesEditorModel(new StatesEditorModel(this)),
m_statesEditorWidget(new StatesEditorWidget(this,,
......@@ -61,6 +60,9 @@ StatesEditorView::StatesEditorView(QObject *parent) :
WidgetInfo StatesEditorView::widgetInfo()
if (!m_statesEditorWidget)
m_statesEditorWidget = new StatesEditorWidget(this,;
return createWidgetInfo(, 0, "StatesEditor", WidgetInfo::TopPane, 0, tr("States Editor"));
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