summaryrefslogtreecommitdiffstats
path: root/tests/pysidetest/testview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pysidetest/testview.cpp')
-rw-r--r--tests/pysidetest/testview.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/tests/pysidetest/testview.cpp b/tests/pysidetest/testview.cpp
index 22ef9dd..75620e0 100644
--- a/tests/pysidetest/testview.cpp
+++ b/tests/pysidetest/testview.cpp
@@ -1,12 +1,24 @@
#include "testview.h"
-#include <QDebug>
-#include <stdio.h>
+
+#include <QWidget>
+#include <QAbstractListModel>
+#include <QAbstractItemDelegate>
QVariant
TestView::getData()
{
QModelIndex index;
- QVariant data = m_model->data(index);
- return data;
+ 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);
}