The easiest way is to pass the row index, since the view and the model have the same concept of what a row is

In your delegate
Qt Code:
  1. mod.deletepages(model.index)
To copy to clipboard, switch view to plain text mode 

In your model
Qt Code:
  1. void listmodel::deletepages(int row)
  2. {
  3. beginRemoveRows(QModelIndex(), row, row);
  4. m_list.remove(row);
  5. endRemoveRows();
  6. }
To copy to clipboard, switch view to plain text mode 

Ideally you don't do two calls from QML though, but have one C++ method that modifies the model and the database.
Otherwise you could forget one and model and database could get out of sync.

Cheers,
_