I would like to display a table in Qt with a special style. I want to draw all the grid lines with the same color and the same width.
The problem is that it's hard to style QHeaderView. All the time I get a 2px mesh width or no mesh at all.
I have the following window with one QTableWIdget

and asociated styleSheet
QWidget {
background-color: #333333;
color: #fffff8;
}
QHeaderView::section {
background-color: #646464;
padding: 4px;
border: 1px solid #fffff8;
font-size: 14pt;
}
QTableWidget {
gridline-color: #fffff8;
font-size: 12pt;
}
QTableWidget QTableCornerButton::section {
background-color: #646464;
border: 1px solid #fffff8;
}
Are there any tricks for all 1px grid lines? I am using 4.8.5 and I cannot upgrade to version 5.x.
source
share