23#include <QStyleOption>
24#include <QApplication>
28 : QStyledItemDelegate(parent)
36 QStyledItemDelegate::paint(painter, option, index);
39 QStyleOption opt = option;
40 opt.state &= ~QStyle::State_Horizontal;
43 if (m_tree->model()->columnCount(index) == 2) {
44 if (index.column() == 1) {
45 opt.rect = m_lastRect;
48 opt.rect.setWidth(opt.rect.width() + m_tree->columnWidth(1));
49 m_lastRect = opt.rect;
53 QApplication::style()->drawPrimitive(QStyle::PE_IndicatorToolBarSeparator, &opt, painter);
BookmarksItemDelegate(QTreeView *parent=nullptr)
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override