From 51d664d76ce6b611e7a7585b209bad9d68fe65d7 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Fri, 27 Sep 2019 15:20:02 -0400 Subject: moved color stuff to ColorTable, now shows sample text and icons --- src/icondelegate.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/icondelegate.cpp') diff --git a/src/icondelegate.cpp b/src/icondelegate.cpp index 39038f3c..03964263 100644 --- a/src/icondelegate.cpp +++ b/src/icondelegate.cpp @@ -32,13 +32,10 @@ IconDelegate::IconDelegate(QObject *parent) { } - -void IconDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const +void IconDelegate::paintIcons( + QPainter *painter, const QStyleOptionViewItem &option, + const QModelIndex &index, const QList& icons) { - QStyledItemDelegate::paint(painter, option, index); - - QList icons = getIcons(index); - int x = 4; painter->save(); @@ -67,3 +64,9 @@ void IconDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, painter->restore(); } +void IconDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const +{ + QStyledItemDelegate::paint(painter, option, index); + paintIcons(painter, option, index, getIcons(index)); +} + -- cgit v1.3.1