You have to add the widget, assuming your centralWidget has a layout, this will add it to the last row:
int rows = ui->centralWidget->rowCount();
ui->centralWidget->addWidget(button rows, 0, rows, 0, 0);
QPushButton button = new QPushButton;
int rows = ui->centralWidget->rowCount();
ui->centralWidget->addWidget(button rows, 0, rows, 0, 0);
To copy to clipboard, switch view to plain text mode
edit: centralWidget HAS to have a layout assigned to it first, then:
ui->centralWidget->layout->addWidget(button rows, 0, rows, 0, 0);
ui->centralWidget->layout->addWidget(button rows, 0, rows, 0, 0);
To copy to clipboard, switch view to plain text mode
Bookmarks