From 292d49c5e91f9053a50f041140e8f02e9cc9c162 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 22 May 2020 15:04:28 +0200 Subject: Document how to use CMake for Qt SQL Task-number: QTBUG-73058 Change-Id: I07fa128853531ec09852647436d9302abac1c12c Reviewed-by: Paul Wicking Reviewed-by: Kai Koehne --- src/sql/doc/src/qtsql.qdoc | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) (limited to 'src/sql/doc/src/qtsql.qdoc') diff --git a/src/sql/doc/src/qtsql.qdoc b/src/sql/doc/src/qtsql.qdoc index 5bc3342c8d..ac70200d38 100644 --- a/src/sql/doc/src/qtsql.qdoc +++ b/src/sql/doc/src/qtsql.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -41,15 +41,13 @@ The \l{SQL Programming} guide contains information about development using Qt SQL. - \section1 Getting Started - To enable Qt SQL in a project, add this directive into the C++ files: - \code - #include - \endcode - To link against the Qt SQL module, add this line to the project file: - \code - QT += sql - \endcode + \include module-use.qdocinc using qt module + \snippet snippets/CMakeLists.txt cmake_use + + See also the \l[QtDoc]{Building with CMake} overview. + + \include module-use.qdocinc building with qmake + \snippet snippets/snippets.pro qmake_use \section1 Licenses and Attributions @@ -81,18 +79,6 @@ \brief Provides a driver layer, SQL API layer, and a user interface layer for SQL databases. - To include the definitions of the module's classes, use the - following directive: - - \snippet code/doc_src_qtsql.cpp 0 - - \if !defined(qtforpython) - To link against the module, add this line to your \l qmake \c - .pro file: - - \snippet code/doc_src_qtsql.pro 1 - \endif - - See the \l{SQL Programming} guide for information about using this - module in your applications. + See the \l{Qt SQL} page and the \l{SQL Programming} guide for further + information about using this module in your application. */ -- cgit v1.2.3