QVariant QPropertyModel::data(const QModelIndex& index, int role) const { if( !index.isValid() ) return QVariant(); if( role != Qt::DisplayRole && role != Qt::ToolTipRole && role != Qt::StatusTipRole ) return QVariant(); Property* prop = GetProperty(index); if( role == Qt::ToolTipRole || role == Qt::StatusTipRole ) return QVariant(prop->GetDescription()); if( index.column() == PROPERTY_COLUMN ) { if( IsComponent(index) ) return QVariant(prop->GetComponentName(index.row())); else return QVariant(prop->GetName()); } else { String str; if( IsComponent(index) ) prop->GetComponentValueString(mEdited, GetComponentIndex(index), str); else prop->GetValueString(mEdited, str); return QVariant(str.c_str()); } }