I think the easiest way is to use QGridLayout (to be honest, I never tried to change the status bar), assuming the status bar is off the widget, you can do this:
QGridLayout *myGridLayout = new QGridLayout(); statusbar->setLayout(myGridLayout) QPushButton *button1 = new QPushButton(this); myGridLayout->addWidget(button1,0,0,1,1); QPushButton *button2 = new QPushButton(this); myGridLayout->addWidget(button2,X,0,1,1);
The biggest X more space that you want to leave between them, I would suggest starting with 3, and then doing a few tests to see how it looks.
Marco source share