Use alternate row colors for port stats window

This makes it more readable. Unfortunately, the alternate row colors
don't apply to the row headers. QHeaderView is supposed to support
QBackgroundRole but there's a long pending bug on the Qt side for the
same - https://bugreports.qt.io/browse/QTBUG-31804
This commit is contained in:
Srivats P 2018-02-08 19:04:29 +05:30
parent ece4ce35ea
commit 0b407af04c

View File

@ -49,6 +49,7 @@ PortStatsWindow::PortStatsWindow(PortGroupList *pgl, QWidget *parent)
else else
tvPortStats->setModel(model); tvPortStats->setModel(model);
tvPortStats->setAlternatingRowColors(true);
tvPortStats->verticalHeader()->setHighlightSections(false); tvPortStats->verticalHeader()->setHighlightSections(false);
tvPortStats->verticalHeader()->setDefaultSectionSize( tvPortStats->verticalHeader()->setDefaultSectionSize(
tvPortStats->verticalHeader()->minimumSectionSize()); tvPortStats->verticalHeader()->minimumSectionSize());