Using Qt C++, I have some buttons with icons and text. As the text of all buttons does not have the same length, icons are not aligned:
I tried to use a QToolButton instead:
button->setToolButtonStyle( Qt::ToolButtonTextBesideIcon );
button->setSizePolicy( QSizePolicy( QSizePolicy::Policy::Expanding, button->sizePolicy().verticalPolicy() ) );
But no success, could not center the text, ended up with that:
Is there a way to have icons be aligned vertically and also text remain centered, like that: