summaryrefslogtreecommitdiffstats
path: root/examples/sql/doc/src/sqlwidgetmapper.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'examples/sql/doc/src/sqlwidgetmapper.qdoc')
-rw-r--r--examples/sql/doc/src/sqlwidgetmapper.qdoc40
1 files changed, 8 insertions, 32 deletions
diff --git a/examples/sql/doc/src/sqlwidgetmapper.qdoc b/examples/sql/doc/src/sqlwidgetmapper.qdoc
index a0fc26a642..0764e601c3 100644
--- a/examples/sql/doc/src/sqlwidgetmapper.qdoc
+++ b/examples/sql/doc/src/sqlwidgetmapper.qdoc
@@ -1,34 +1,11 @@
-/****************************************************************************
-**
-** 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
/*!
\example sqlwidgetmapper
\title SQL Widget Mapper Example
\ingroup sql_examples
+ \examplecategory {Data Processing & I/O}
\brief The SQL Widget Mapper example shows how to use a map information from a
database to widgets on a form.
@@ -125,8 +102,7 @@
As a result, the user is able to select an item from the combo box,
and the associated value is written back to the model.
- The rest of the constructor is very similar to that of the
- \l{Simple Widget Mapper Example}:
+ The rest of the constructor sets up connections and layouts:
\snippet sqlwidgetmapper/window.cpp Set up connections and layouts
@@ -139,7 +115,7 @@
\section1 Delegate Class Definition and Implementation
The delegate we use to mediate interaction between the widget mapper and
- the input widgets is a small QItemDelegate subclass:
+ the input widgets is a small QStyledItemDelegate subclass:
\snippet sqlwidgetmapper/delegate.h Delegate class definition
@@ -150,7 +126,7 @@
Since we only provide an empty implementation of the constructor, we
concentrate on the other two functions.
- The \l{QItemDelegate::}{setEditorData()} implementation takes the data
+ The \l{QStyledItemDelegate::}{setEditorData()} implementation takes the data
referred to by the model index supplied and processes it according to
the presence of a \c currentIndex property in the editor widget:
@@ -162,10 +138,10 @@
values needed for the \c currentIndex property.
As a result, instead of showing "0", "1" or "2" in the combo box, one of
- its predefined set of items is shown. We call QItemDelegate::setEditorData()
+ its predefined set of items is shown. We call QStyledItemDelegate::setEditorData()
for widgets without the \c currentIndex property.
- The \l{QItemDelegate::}{setModelData()} implementation performs the reverse
+ The \l{QStyledItemDelegate::}{setModelData()} implementation performs the reverse
process, taking the value stored in the widget's \c currentIndex property
and storing it back in the model: