From 94e7da1400e59256f41f72b4592d4a9df1cca5a0 Mon Sep 17 00:00:00 2001 From: Arno Date: Fri, 8 Jul 2011 10:03:14 +0200 Subject: Turn metadata display into a QTreeView This wasn't as easy as it sounds. I had to completely redesign the SeriesMetadataModel. Now it's a hybrid between a ListModel and a TreeModel. The actual data is held in a QList, the tree is only for display. --- smtreemodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'smtreemodel.cpp') diff --git a/smtreemodel.cpp b/smtreemodel.cpp index bcd1a8a..743e8be 100644 --- a/smtreemodel.cpp +++ b/smtreemodel.cpp @@ -84,7 +84,7 @@ const QHash SmTreeModel::headerData() const{ bool SmTreeModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role){ if((orientation == Qt::Horizontal) && (role == Qt::DisplayRole)){ - mRootItem->setData(section, value); + mHeaders[section] = value.toString(); emit headerDataChanged(orientation, section, section); return true; } -- cgit v1.2.3-70-g09d2