forked from qt-creator/qt-creator
QmlJSInspector: Allow resizing of columns in property inspector
Change-Id: I314a76ffe89268b651e4d8358e9d90072a7b747e Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
This commit is contained in:
@@ -262,13 +262,21 @@ QmlJSPropertyInspector::QmlJSPropertyInspector(QWidget *parent)
|
||||
setFrameStyle(QFrame::NoFrame);
|
||||
setExpandsOnDoubleClick(true);
|
||||
|
||||
header()->setResizeMode(QHeaderView::ResizeToContents);
|
||||
header()->setMinimumSectionSize(150);
|
||||
header()->setDefaultAlignment(Qt::AlignLeft);
|
||||
header()->setClickable(true);
|
||||
setRootIsDecorated(false);
|
||||
|
||||
setItemDelegateForColumn(PROPERTY_VALUE_COLUMN, new PropertyEditDelegate(this));
|
||||
|
||||
setModel(&m_model);
|
||||
|
||||
connect(header(), SIGNAL(sectionClicked(int)),
|
||||
SLOT(headerSectionClicked(int)));
|
||||
}
|
||||
|
||||
void QmlJSPropertyInspector::headerSectionClicked(int logicalIndex)
|
||||
{
|
||||
resizeColumnToContents(logicalIndex);
|
||||
}
|
||||
|
||||
void QmlJSPropertyInspector::clear()
|
||||
|
@@ -120,6 +120,9 @@ public slots:
|
||||
void openExpressionEditor(const QModelIndex &itemIndex);
|
||||
void openColorSelector(const QModelIndex &itemIndex);
|
||||
|
||||
private slots:
|
||||
void headerSectionClicked(int logicalIndex);
|
||||
|
||||
private:
|
||||
friend class PropertyEditDelegate;
|
||||
void buildPropertyTree(const QmlDebugObjectReference &);
|
||||
|
Reference in New Issue
Block a user