summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/sqldatabase/sqldatabase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/snippets/sqldatabase/sqldatabase.cpp')
-rw-r--r--doc/src/snippets/sqldatabase/sqldatabase.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/src/snippets/sqldatabase/sqldatabase.cpp b/doc/src/snippets/sqldatabase/sqldatabase.cpp
index abe2a67..a027a84 100644
--- a/doc/src/snippets/sqldatabase/sqldatabase.cpp
+++ b/doc/src/snippets/sqldatabase/sqldatabase.cpp
@@ -280,7 +280,7 @@ QVariant MyModel::data(const QModelIndex &item, int role) const
void QSqlTableModel_snippets()
{
//! [24]
- QSqlTableModel *model = new QSqlTableModel;
+ QSqlTableModel *model = new QSqlTableModel(parentObject, database);
model->setTable("employee");
model->setEditStrategy(QSqlTableModel::OnManualSubmit);
model->select();