#include <QtSql/qsqltablemodel.h> #ifndef QSQLTABLEMODEL_H class QSqlTableModel: public QSqlQueryModel{ /* Some contents are skipped to improve readability */ protected: void setPrimaryKey(struct QSqlIndex const & key); /* ... */ }; #endif // QSQLTABLEMODEL_H