Use PgLabItemDelegate for rendering the table QTreeView

This commit is contained in:
eelke 2023-01-22 19:28:08 +01:00
parent abc0dd892f
commit 7728417392
2 changed files with 20 additions and 9 deletions

View file

@ -135,7 +135,7 @@ void PgLabItemDelegate::initStyleOption(QStyleOptionViewItem *option,
suffix = "B";
forground_color = QColorConstants::Svg::darkblue;
}
option->text = QString{ "%1 %2" }.arg(val, 3, 'g', -1 ).arg(suffix) ;
option->text = QString{ "%1 %2" }.arg(val, 0, 'g', 3).arg(suffix) ;
}
else {
auto str = value.toString();