Call beginResetModel() and endResetModel() in clear().
