How can I set the cell borders in a QTableWidget to 0px? Preferably I can choose which sides of a cell's border to set to 0, but I can live with setting them all to 0 as well.
EDIT: Either setting the border to 0px or setting the color to white would be good as well.
You can disable all the borders with QTableWidget::setShowGrid
, and re-enable some of them with a style sheet (for instance: "QTableView::item { border-left: 1px solid black; }"
)
The latter are cell interior borders, so they might not be as well aligned as the grid.
If you want to change the borders individually for each cell, you need to write a delegate (like in that answer).
check if QTableWidget's setShowGrid would work for you, smth like this:
tableWidget->setShowGrid(false);
hope this helps, regards
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With