forked from qt-creator/qt-creator
TextEditor: Snippetssettings QTableView to QTreeView
QTreeView is a better list view with columns than QTableView. One special reason for this change is that QTreeView finds a proper default row height regardless of the system DPI. Change-Id: I80c7fe0d15be620162cefa53b5b231b62931c614 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#include <coreplugin/icore.h>
|
||||
#include <texteditor/texteditorsettings.h>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <utils/headerviewstretcher.h>
|
||||
|
||||
#include <QAbstractTableModel>
|
||||
#include <QList>
|
||||
@@ -341,12 +342,8 @@ void SnippetsSettingsPagePrivate::configureUi(QWidget *w)
|
||||
connect(snippetEditor, SIGNAL(snippetContentChanged()), this, SLOT(setSnippetContent()));
|
||||
}
|
||||
|
||||
m_ui.snippetsTable->setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||
m_ui.snippetsTable->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
m_ui.snippetsTable->horizontalHeader()->setStretchLastSection(true);
|
||||
m_ui.snippetsTable->horizontalHeader()->setHighlightSections(false);
|
||||
m_ui.snippetsTable->verticalHeader()->setVisible(false);
|
||||
m_ui.snippetsTable->setModel(m_model);
|
||||
new Utils::HeaderViewStretcher(m_ui.snippetsTable->header(), 1);
|
||||
|
||||
m_ui.revertButton->setEnabled(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user