summaryrefslogtreecommitdiffstats
path: root/src/sql/doc/src/sql-programming.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/sql/doc/src/sql-programming.qdoc')
-rw-r--r--src/sql/doc/src/sql-programming.qdoc45
1 files changed, 8 insertions, 37 deletions
diff --git a/src/sql/doc/src/sql-programming.qdoc b/src/sql/doc/src/sql-programming.qdoc
index ece89a30ab..a7f87fe73f 100644
--- a/src/sql/doc/src/sql-programming.qdoc
+++ b/src/sql/doc/src/sql-programming.qdoc
@@ -1,29 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\group database
@@ -105,7 +81,6 @@
\page sql-connecting.html
\title Connecting to Databases
- \contentspage SQL Programming
\previouspage SQL Programming
\nextpage Executing SQL Statements
@@ -175,7 +150,6 @@
\title Executing SQL Statements
\previouspage Connecting to Databases
- \contentspage SQL Programming
\nextpage Using the SQL Model Classes
@@ -325,7 +299,6 @@
\title Using the SQL Model Classes
\previouspage Executing SQL Statements
- \contentspage SQL Programming
\nextpage Presenting Data in a Table View
In addition to QSqlQuery, Qt offers three higher-level classes
@@ -471,7 +444,6 @@
\title Presenting Data in a Table View
\previouspage Using the SQL Model Classes
- \contentspage SQL Programming
\nextpage Creating Data-Aware Forms
The QSqlQueryModel, QSqlTableModel, and QSqlRelationalTableModel
@@ -484,15 +456,15 @@
The following example creates a view based on an SQL data model:
- \snippet sqldatabase/sqldatabase.cpp 17
- \snippet sqldatabase/sqldatabase.cpp 18
- \snippet sqldatabase/sqldatabase.cpp 19
+ \snippet sqldatabase/sqldatabase_snippet.cpp 17
+ \snippet sqldatabase/sqldatabase_snippet.cpp 18
+ \snippet sqldatabase/sqldatabase_snippet.cpp 19
If the model is a read-write model (e.g., QSqlTableModel), the
view lets the user edit the fields. You can disable this by
calling
- \snippet sqldatabase/sqldatabase.cpp 20
+ \snippet sqldatabase/sqldatabase_snippet.cpp 20
You can use the same model as a data source for multiple views.
If the user edits the model through one of the views, the other
@@ -524,11 +496,11 @@
submitted.
The items in the view are rendered using a delegate. The default
- delegate, QItemDelegate, handles the most common data types (\c
+ delegate, QStyledItemDelegate, handles the most common data types (\c
int, QString, QImage, etc.). The delegate is also responsible for
providing editor widgets (e.g., a combobox) when the user starts
editing an item in the view. You can create your own delegates by
- subclassing QAbstractItemDelegate or QItemDelegate. See
+ subclassing QAbstractItemDelegate or QStyledItemDelegate. See
\l{Model/View Programming} for more information.
QSqlTableModel is optimized to operate on a single table at a
@@ -575,7 +547,6 @@
\title Creating Data-Aware Forms
\previouspage Presenting Data in a Table View
- \contentspage SQL Programming
Using the SQL models described above, the contents of a database can
be presented to other model/view components. For some applications,