vnote/src/vnofocusitemdelegate.cpp
Le Tan e32ee1fa90 refactor: VNotebookSelector
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-07 13:08:06 +08:00

18 lines
492 B
C++

#include "vnofocusitemdelegate.h"
VNoFocusItemDelegate::VNoFocusItemDelegate(QWidget *parent)
: QStyledItemDelegate(parent)
{
}
void VNoFocusItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index) const
{
QStyleOptionViewItem itemOp(option);
if (itemOp.state & QStyle::State_HasFocus) {
itemOp.state ^= QStyle::State_HasFocus;
}
QStyledItemDelegate::paint(painter, itemOp, index);
}