Unsolved how to pack a completely a widget in a cell of a QTableWidget
-
I have following code
LabelButtonCellWidget::LabelButtonCellWidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::LabelButtonCellWidget)
{
ui->setupUi(this);
}LabelButtonCellWidget::~LabelButtonCellWidget()
{
delete ui;
}Following ui file
https://paste.ofcode.org/33qXZUWgf7eX4SdZpTKeqY4and Usage of LabelButton Widget
col = 5;
LabelButtonCellWidget* l1 = new LabelButtonCellWidget(this) ;
l1->setStyleSheet("background-color: rgb(228,228,228)");
t->setCellWidget(rowCount,col,l1);
t->setColumnWidth(col,15);but the cell widget is not coming properly
Is it possible to remove the space and pack the text + completely in the cell
-
@Qt-Enthusiast said in how to pack a completely a widget in a cell of a QTableWidget:
Is it possible to remove the space and pack the text + completely in the cell
What do you mean? What should happen with the extra space if the cell is wider than the content of your widget?