summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code/doc_src_qt4-sql.qdoc
blob: 74b04eb959782c2109b0801bf3d9f91734b001d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//! [0]
QSqlQueryModel model;
model.setQuery("select * from person");

QTableView view;
view.setModel(&model);
view.show();
//! [0]


//! [1]
QSqlTableModel model;
model.setTable("person");
model.select();

QTableView view;
view.setModel(&model);
view.show();
//! [1]