Hi,
I want to add a small image centered on the push button as well as a descriptive text below it. This should give an effect like shown in the attached image.
button_bar.jpg
How can I achieve this.
Thanks in advance.
- Charvi.
Hi,
I want to add a small image centered on the push button as well as a descriptive text below it. This should give an effect like shown in the attached image.
button_bar.jpg
How can I achieve this.
Thanks in advance.
- Charvi.
By calling the methods corresponding to adding an icon and a text to a button.How can I achieve this.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Use QToolButton instead of QPushButton.
Any other way of achieving this using push button itself ?
Sure, subclass QPushButton and override the paintEvent() to do whatever you want to paint the widget. You will almost certainly find the QToolButton easier to use.
Bookmarks