-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathresultitemdelegate.cpp
More file actions
40 lines (31 loc) · 831 Bytes
/
Copy pathresultitemdelegate.cpp
File metadata and controls
40 lines (31 loc) · 831 Bytes
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
36
37
38
39
40
#include "StdAfx.h"
#include "resultitemdelegate.h"
ResultItemDelegate::ResultItemDelegate(QObject *parent)
: QStyledItemDelegate(parent)
{
}
ResultItemDelegate::~ResultItemDelegate()
{
}
void ResultItemDelegate::SetTreeView(QTreeView *view)
{
m_pTreeView = view;
}
//QWidget* ResultItemDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
//{
//
//};
void ResultItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
{
//if (index.column() == COLUMN_OPERATE)
//{
// QLabel *label = new QLabel();
// label->setText("hello");
// m_pTreeView->setIndexWidget(index, label);
//}
//else
//{
// QStyledItemDelegate::paint(painter, option, index);
//}
QStyledItemDelegate::paint(painter, option, index);
}