Setting text alignment of a QToolButton
-
Hi,
I also tried the same with stylesheets by setting the "text-align: left;" property but it didnt work out.
One interesting thing is that if we add an image to the toolButton then the text is aligned to the left.
So for the time being you can add a tranparent image to your resources/toolButton and write@ui->toolButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);@
-
Well the thing is that I already have added a icon to the QToolButton, and the text is still centred.
Also, my text is set to be under:
@toolButton->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);@
I guess I have to have short button texts then...Thank you for your time!