aboutsummaryrefslogtreecommitdiffstats
path: root/tests/pysidetest/testview.cpp
blob: 75620e0dbfbb2b361b29f33924ca10139e423a5e (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
#include "testview.h"

#include <QWidget>
#include <QAbstractListModel>
#include <QAbstractItemDelegate>

QVariant
TestView::getData()
{
    QModelIndex index;
    return m_model->data(index);
}

QWidget*
TestView::getEditorWidgetFromItemDelegate() const
{
    if (!m_delegate)
        return 0;

    QModelIndex index;
    QStyleOptionViewItem options;
    return m_delegate->createEditor(0, options, index);
}