Replace deprecated QModelIndex::child with QAbstractItemModel::index