Some minor changes in the instance model and control

This commit is contained in:
Petr Mrázek 2013-02-06 07:07:44 +01:00
parent 00893b3cfc
commit 4e9006769e
2 changed files with 12 additions and 5 deletions

View File

@ -143,12 +143,9 @@ QVariant InstanceModel::data ( const QModelIndex& index, int role ) const
if (!index.isValid())
return QVariant();
if (role != Qt::DisplayRole)
return QVariant();
InstanceModelItem *item = static_cast<InstanceModelItem*>(index.internalPointer());
return item->data(index.column());
return item->data(role);
}
QModelIndex InstanceModel::index ( int row, int column, const QModelIndex& parent ) const

View File

@ -34,7 +34,17 @@
<number>0</number>
</property>
<item>
<widget class="QTreeView" name="instanceView"/>
<widget class="QTreeView" name="instanceView">
<property name="animated">
<bool>true</bool>
</property>
<property name="allColumnsShowFocus">
<bool>true</bool>
</property>
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
</widget>
</item>
</layout>
</widget>