Some minor changes in the instance model and control
This commit is contained in:
parent
00893b3cfc
commit
4e9006769e
@ -143,12 +143,9 @@ QVariant InstanceModel::data ( const QModelIndex& index, int role ) const
|
|||||||
if (!index.isValid())
|
if (!index.isValid())
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
|
||||||
if (role != Qt::DisplayRole)
|
|
||||||
return QVariant();
|
|
||||||
|
|
||||||
InstanceModelItem *item = static_cast<InstanceModelItem*>(index.internalPointer());
|
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
|
QModelIndex InstanceModel::index ( int row, int column, const QModelIndex& parent ) const
|
||||||
|
@ -34,7 +34,17 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<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>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
Loading…
Reference in New Issue
Block a user