aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols/chattutorial/chapter5/sqlcontactmodel.h
diff options
context:
space:
mode:
authorMitch Curtis <[email protected]>2023-12-18 13:21:39 +0800
committerMitch Curtis <[email protected]>2024-01-08 10:19:19 +0800
commitc11436857fe2ee6951c97d2d58a9227120c7884c (patch)
treee162fbd1afa5980b2994929606015dda71478c55 /examples/quickcontrols/chattutorial/chapter5/sqlcontactmodel.h
parent06e42e733ed6658abbb30ba7be2e571b4533d009 (diff)
Improve chattutorial example
- Use modern QML type registration. - Fix qmllint warnings. - Tidy up code. - Update copyright year. Fixes: QTBUG-119986 Change-Id: Ibb47c929a14cd0e786acb7c7496e6cce34f624df Reviewed-by: Ulf Hermann <[email protected]>
Diffstat (limited to 'examples/quickcontrols/chattutorial/chapter5/sqlcontactmodel.h')
-rw-r--r--examples/quickcontrols/chattutorial/chapter5/sqlcontactmodel.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/quickcontrols/chattutorial/chapter5/sqlcontactmodel.h b/examples/quickcontrols/chattutorial/chapter5/sqlcontactmodel.h
index a6d24a4774..c7f9a154eb 100644
--- a/examples/quickcontrols/chattutorial/chapter5/sqlcontactmodel.h
+++ b/examples/quickcontrols/chattutorial/chapter5/sqlcontactmodel.h
@@ -1,13 +1,17 @@
-// Copyright (C) 2017 The Qt Company Ltd.
+// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef SQLCONTACTMODEL_H
#define SQLCONTACTMODEL_H
+#include <QQmlEngine>
#include <QSqlQueryModel>
class SqlContactModel : public QSqlQueryModel
{
+ Q_OBJECT
+ QML_ELEMENT
+
public:
SqlContactModel(QObject *parent = nullptr);
};