summaryrefslogtreecommitdiffstats
path: root/tests/pysidetest/testview.cpp
blob: 6adfe69efe6052cf65a189ca0a186b0f53106226 (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 <QDebug>
#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);
}