diff options
Diffstat (limited to 'doc/src/snippets/code/doc_src_qt4-sql.qdoc')
-rw-r--r-- | doc/src/snippets/code/doc_src_qt4-sql.qdoc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/src/snippets/code/doc_src_qt4-sql.qdoc b/doc/src/snippets/code/doc_src_qt4-sql.qdoc new file mode 100644 index 0000000..74b04eb --- /dev/null +++ b/doc/src/snippets/code/doc_src_qt4-sql.qdoc @@ -0,0 +1,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] |