[Resolved] How to add three buttons into a cell of an QTabWidget?
-
Hi
I have a QtabWidget and I want to add three buttons into its last cells. How can I deal with?? -
Hi,
Do you mean QTableWidget ? If so have a look at setCellWidget
-
Yes I mean an QTableWidget. Thank you SGaist. I'm able now to add buttons into a celleWidget. Here's my code:
@QWidget * buttonGroup = new QWidget;
QPushButton mVisualize = new QPushButton();
mVisualize->setMinimumSize(25, 25);QPushButton mEdite = new QPushButton();
mEdite->setMinimumSize(25, 25);QPushButton mDelete = new QPushButton();
mDelete->setMinimumSize(25, 25);QHBoxLayout * horizontalLayhout = new QHBoxLayout;
horizontalLayhout->addWidget(mVisualize);
horizontalLayhout->addWidget(mEdite);
horizontalLayhout->addWidget(mDelete);buttonGroup->setLayout(horizontalLayhout);
ui->myTableWidget->setCellWidget(1, 3,buttonGroup); @