blob: ade60682fbedd31b608558688d45606558d11f8f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "testview.h"
#include <QtCore/QDebug>
#include <QtCore/QAbstractListModel>
#include <QtWidgets/QAbstractItemDelegate>
#include <QtWidgets/QWidget>
QVariant
TestView::getData()
{
QModelIndex index;
return m_model->data(index);
}
QWidget*
TestView::getEditorWidgetFromItemDelegate() const
{
if (!m_delegate)
return nullptr;
QModelIndex index;
QStyleOptionViewItem options;
return m_delegate->createEditor(nullptr, options, index);
}
|