Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquicktemplatesutils.cpp
Go to the documentation of this file.
1
// Copyright (C) 2024 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
include
"qquicktemplatesutils_p.h"
6
7
#
include
<
QtQuickTemplates2
/
private
/
qquickcontrol_p
.
h
>
8
#
include
<
QtQuickTemplates2
/
private
/
qquicktextarea_p
.
h
>
9
#
include
<
QtQuickTemplates2
/
private
/
qquicktextfield_p
.
h
>
10
11
QT_BEGIN_NAMESPACE
12
13
namespace
QQuickTemplatesUtils
{
14
15
/*!
16
\internal
17
18
Returns \c true if \a item is a \c QQuickControl or similar interactive
19
type that should be a QQuickControl-subclass but cannot due to existing
20
inheritance; e.g. \c QQuickTextField or \c QQuickTextArea.
21
22
\c QQuickPopup is not considered a controls type for this function due to
23
the original use cases that resulted in this being factored out.
24
25
\c QQuickLabel is not interactive.
26
*/
27
bool
isInteractiveControlType
(
const
QQuickItem *item)
28
{
29
return
qobject_cast<
const
QQuickControl *>(item)
30
|| qobject_cast<
const
QQuickTextField *>(item)
31
|| qobject_cast<
const
QQuickTextArea *>(item);
32
}
33
34
}
// namespace QQuickTemplatesUtils
35
36
QT_END_NAMESPACE
QPlatformGraphicsBufferHelper
\inmodule QtGui
QQuickTemplatesUtils
Definition
qquicktemplatesutils_p.h:23
QQuickTemplatesUtils::isInteractiveControlType
bool isInteractiveControlType(const QQuickItem *item)
Definition
qquicktemplatesutils.cpp:27
qtdeclarative
src
quicktemplates
qquicktemplatesutils.cpp
Generated on
for Qt by
1.14.0