Hello!
Is there any simple way to put text below icon on button? I've tried, but text is always on right. I know that there is Qt::LayoutDirection, but there is only from right to left or from left to right.
thanks in advance
best regards
Tomasz
Hello!
Is there any simple way to put text below icon on button? I've tried, but text is always on right. I know that there is Qt::LayoutDirection, but there is only from right to left or from left to right.
thanks in advance
best regards
Tomasz
Use QToolButton instead of QPushButton and take a look at the properties it offers.
Tomasz (3rd December 2010)
Can I use only Qt::ToolButtonStyle? I'm asking because Qt::ToolButtonTextUnderIcon sets icon on top of the button (icon small and the button is big). Can I put it in the middle of a button?
thanks in advance
best regards
Tomasz
Icon. It's aligned to the top. I've tried to set it by stylesheet but with no result.
thanks in advance
best regards
Tomasz
You can't put it in the middle because there is a text there... I don't think I understand your problem.
hi, Tomasz,
u can resise ur icon , so tat ur text will be on the base. if u hav a small icon , the text will be in centre. when u increase the icon's size ur text will be positioned in the bottom.
hope it helps
Bala
My button size is 150x100. Icon size is 50x50, and I've also set iconSize to 50x50 (don't want bigger). Maybe it's a little bit weird to make button that size but i would like it this way.
thanks in advance
best regards
Tomasz
In that case it might be quicker to reimplement the paint event for the button and draw it yourself. Optionally you can place the icon on a larger pixmap so that the icon seems to be larger to fool QToolButton's layouting scheme.
Bookmarks