Install a QGridLayout in a widget with two columns and two rows, add a button to the lower right cell, then set the first row and first column to stretch.
QWidget *widget = new QWidget();
QGridLayout *layout = new QGridLayout(widget);
QPushButton *button = new QPushButton(QString("Button"), widget);
layout->setContentsMargin(10,10,10,10);
layout->addWidget(button, 1, 1);
layout->setRowStretch(0, 1);
layout->setColumnStretch(0, 1);
source
share