Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qoverload.qdoc
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4/*! \fn template <typename T> auto qOverload(T functionPointer)
5 \relates <QOverload>
6 \since 5.7
7
8 Returns a pointer to an overloaded function. The template
9 parameter is the list of the argument types of the function.
10 \a functionPointer is the pointer to the (member) function:
11
12 \snippet code/src_corelib_global_qglobal.cpp 52
13
14 If a member function is also const-overloaded \l qConstOverload and
15 \l qNonConstOverload need to be used.
16
17 \sa qConstOverload(), qNonConstOverload(), {Differences between String-Based
18 and Functor-Based Connections}
19*/
20
21/*! \fn template <typename T> auto qConstOverload(T memberFunctionPointer)
22 \relates <QOverload>
23 \since 5.7
24
25 Returns the \a memberFunctionPointer pointer to a constant member function:
26
27 \snippet code/src_corelib_global_qglobal.cpp 54
28
29 \sa qOverload, qNonConstOverload, {Differences between String-Based
30 and Functor-Based Connections}
31*/
32
33/*! \fn template <typename T> auto qNonConstOverload(T memberFunctionPointer)
34 \relates <QOverload>
35 \since 5.7
36
37 Returns the \a memberFunctionPointer pointer to a non-constant member function:
38
39 \snippet code/src_corelib_global_qglobal.cpp 54
40
41 \sa qOverload, qNonConstOverload, {Differences between String-Based
42 and Functor-Based Connections}
43*/