blob: 746def83e443f058f761134933f7922ddc52afb1 (
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
28
29
30
31
32
33
34
35
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef TESTVIEW_H
#define TESTVIEW_H
#include "pysidetest_macros.h"
#include <QtCore/QObject>
QT_BEGIN_NAMESPACE
class QWidget;
class QAbstractListModel;
class QAbstractItemDelegate;
QT_END_NAMESPACE
class PYSIDETEST_API TestView : public QObject
{
Q_OBJECT
public:
TestView(QAbstractListModel* model, QObject* parent = nullptr) :
QObject(parent), m_model(model) {}
QAbstractListModel* model() { return m_model; }
QVariant getData();
void setItemDelegate(QAbstractItemDelegate* delegate) { m_delegate = delegate; }
QWidget* getEditorWidgetFromItemDelegate() const;
private:
QAbstractListModel* m_model;
QAbstractItemDelegate* m_delegate = nullptr;
};
#endif // TESTVIEW_H
|