|
|
@ -46,9 +46,10 @@ public: |
|
|
|
bool confirmed = index.data(TransactionTableModel::ConfirmedRole).toBool(); |
|
|
|
bool confirmed = index.data(TransactionTableModel::ConfirmedRole).toBool(); |
|
|
|
QVariant value = index.data(Qt::ForegroundRole); |
|
|
|
QVariant value = index.data(Qt::ForegroundRole); |
|
|
|
QColor foreground = option.palette.color(QPalette::Text); |
|
|
|
QColor foreground = option.palette.color(QPalette::Text); |
|
|
|
if(qVariantCanConvert<QColor>(value)) |
|
|
|
if(value.canConvert<QBrush>()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
foreground = qvariant_cast<QColor>(value); |
|
|
|
QBrush brush = qvariant_cast<QBrush>(value); |
|
|
|
|
|
|
|
foreground = brush.color(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
painter->setPen(foreground); |
|
|
|
painter->setPen(foreground); |
|
|
|