diff --git a/src/plugins/qmljseditor/qmljseditor.cpp b/src/plugins/qmljseditor/qmljseditor.cpp index b22de6a47d9..a3f9bd55424 100644 --- a/src/plugins/qmljseditor/qmljseditor.cpp +++ b/src/plugins/qmljseditor/qmljseditor.cpp @@ -75,6 +75,7 @@ #include #include #include +#include #include #include @@ -1070,6 +1071,12 @@ void QmlJSTextEditorWidget::createToolBar(QmlJSEditorEditable *editor) m_outlineCombo->setModel(m_outlineModel); QTreeView *treeView = new QTreeView; + + Utils::AnnotatedItemDelegate *itemDelegate = new Utils::AnnotatedItemDelegate(this); + itemDelegate->setDelimiter(QLatin1String(" ")); + itemDelegate->setAnnotationRole(QmlOutlineModel::AnnotationRole); + treeView->setItemDelegateForColumn(0, itemDelegate); + treeView->header()->hide(); treeView->setItemsExpandable(false); treeView->setRootIsDecorated(false);