Hi everybody,

I defined my own TableModel using the QAbstractTableModel class...all run perfectly just i couldn't use the rowCount method in my program :

"no Matching function for call to TableModel::rowCount const"
"condidates are virtual int TableModel::rowCount const"

i'm sure that i have defined correctly the virtual method but i don't know what happened ? i have also changed the example of adresse book:
Qt Code:
  1. QVariant TableModel::data(const QModelIndex &index, int role) const
  2. {
  3. if (!index.isValid())
  4. return QVariant();
  5.  
  6. if (index.row() >= /*listOfPairs.size()*/ rowCount() || index.row() < 0)
  7. return QVariant();
  8.  
  9. if (role == Qt::DisplayRole) {
  10. QPair<QString, QString> pair = listOfPairs.at(index.row());
  11.  
  12. if (index.column() == 0)
  13. return pair.first;
  14. else if (index.column() == 1)
  15. return pair.second;
  16. }
  17. return QVariant();
  18. }
To copy to clipboard, switch view to plain text mode 
same fact !!
any idea ??