blob: 362239112f11142c2b07334dc8f6c559f2c7a552 (
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 == nullptr)
return nullptr;
QModelIndex index;
QStyleOptionViewItem options;
return m_delegate->createEditor(nullptr, options, index);
}
|