treemodel.cpp
changeset 848 e265f07f2173
parent 847 43268373032d
     1.1 --- a/treemodel.cpp	Wed Jun 09 13:14:08 2010 +0000
     1.2 +++ b/treemodel.cpp	Mon Jun 14 13:59:17 2010 +0000
     1.3 @@ -26,10 +26,15 @@
     1.4      if (!index.isValid())
     1.5          return QVariant();
     1.6  
     1.7 +    TreeItem *item = getItem (index);
     1.8 +
     1.9      if (role != Qt::DisplayRole)
    1.10 -        return QVariant();
    1.11 +	{
    1.12 +		if (role == Qt::ForegroundRole ) 
    1.13 +			return item->getHeadingColor();
    1.14 +		return QVariant();
    1.15 +	}	
    1.16  
    1.17 -    TreeItem *item = getItem (index);
    1.18  
    1.19      return item->data(index.column());
    1.20  }