C++ (Qt)Qt::ItemFlags QAbstractItemModel::flags(const QModelIndex &index) const { if (!index.isValid()) return (... | Qt::ItemIsDropEnabled) ; .........}