QmlJSInspector: Allow resizing of columns in property inspector

Change-Id: I314a76ffe89268b651e4d8358e9d90072a7b747e
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
This commit is contained in:
Aurindam Jana
2012-03-27 16:33:25 +02:00
parent 876e9347d4
commit a26db1529f
2 changed files with 13 additions and 2 deletions

View File

@@ -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()

View File

@@ -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 &);