Hi,

in my own model I have:
Qt Code:
  1. QVariant data(const QModelIndex &index, int role) const;
  2. QVariant data(const QModelIndex &index, BibtexGlobal::SearchFilter role) const;
  3. // BibtexGlobal::SearchFilter is an enum
To copy to clipboard, switch view to plain text mode 
And in an other class I call:
Qt Code:
  1. QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
  2. QHash<BibtexGlobal::SearchFilter, QRegExp*>::const_iterator i = m_filter.constBegin();
  3. while (i != m_filter.constEnd())
  4. {
  5. qWarning() << sourceModel()->data(index, i.key());
  6. ++i;
  7. }
To copy to clipboard, switch view to plain text mode 

But although i.key() is BibtexGlobal::SearchFilter the function data(const QModelIndex &index, int role) is called. Why? Is int and enum for the compiler the same?

Thanks