|
|
|
@ -63,6 +63,9 @@ class FinishedListDelegate: public QItemDelegate {
@@ -63,6 +63,9 @@ class FinishedListDelegate: public QItemDelegate {
|
|
|
|
|
case F_RATIO:{ |
|
|
|
|
QItemDelegate::drawBackground(painter, opt, index); |
|
|
|
|
double ratio = index.data().toDouble(); |
|
|
|
|
if(ratio > 100.) |
|
|
|
|
QItemDelegate::drawDisplay(painter, opt, opt.rect, QString::fromUtf8("∞")); |
|
|
|
|
else |
|
|
|
|
QItemDelegate::drawDisplay(painter, opt, opt.rect, QString(QByteArray::number(ratio, 'f', 1))); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|