From QSqlQueryModel::insertColumns():EDIT: Commented without trying your code. Looks like testIndex.parent() does return an invalid QModelIndex. Try:The parent parameter must always be an invalid QModelIndex, since the model does not support parent-child relationships.Both work for me.Qt Code:
atsFieldModel->insertColumn(2)To copy to clipboard, switch view to plain text mode
Bookmarks