[Solved] QTableWidget padding
-
wrote on 8 Jan 2013, 18:10 last edited by
I use setCellWidget() method of the class QTableWidget but It puts A LOT of space between the widget border and the cell border, is there a way to remove this cell padding.
I tried with a stylesheet:
@
QTableWidget::item{
border: none;
padding: 0px;
margin: 0px;
}
@but it didn't work
-
Well, maybe check if you're setting the style on right widget. I just checked setting the padding and it "just works".
With code like this:
@
ui->tableWidget->setStyleSheet("QTableWidget::item { padding: 0px }");
ui->tableWidget_2->setStyleSheet("QTableWidget::item { padding: 10px }");
@
i get
!http://img854.imageshack.us/img854/7120/tablepadding.jpg(table padding)!
1/2