1// Copyright (C) 2019 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
4#include <QtQmlModels/private/qqmlabstractdelegatecomponent_p.h>
5#include <QtQmlModels/private/qqmladaptormodel_p.h>
6
7QT_BEGIN_NAMESPACE
8
9QQmlAbstractDelegateComponent::QQmlAbstractDelegateComponent(QObject *parent)
10 : QQmlComponent(parent)
11{
12}
13
14QQmlAbstractDelegateComponent::~QQmlAbstractDelegateComponent()
15{
16}
17
18QVariant QQmlAbstractDelegateComponent::value(QQmlAdaptorModel *adaptorModel, int row, int column, const QString &role) const
19{
20 if (!adaptorModel)
21 return QVariant();
22 return adaptorModel->value(index: adaptorModel->indexAt(row, column), role);
23}
24
25QT_END_NAMESPACE
26
27#include "moc_qqmlabstractdelegatecomponent_p.cpp"
28

source code of qtdeclarative/src/qmlmodels/qqmlabstractdelegatecomponent.cpp