Looks like the whole model is cleared anyway so how about calling QAbstractItemModel::reset()?
By the way, QAbstractItemModel::removeRow() implementation does nothing so there is no need to call it.Qt Code:
//beginRemoveRows( QModelIndex(), 0, m_Data.count() / 4 ); //for( int i = 0; i < m_Data.count() / 4; i++ ) // QAbstractItemModel::removeRow( i ); m_Data.clear(); reset(); //endRemoveRows();To copy to clipboard, switch view to plain text mode
Bookmarks