how to place a image , 2 lables on a QPushButton ?
My requirement is i want to have one button in which a image should be placed on left hand side , text should be there just after the image and one more text at the end of the button ?
Currently i am using below code which allows me to place image on left hand side but text comes in middle and i am not able to set text at the end of my button.
b1->setStyleSheet(
"background-image: url(:/user.gif);"
"background-repeat:no-repeat;"
"background-attachment:fixed;"
"background-position:left top;"
"border-style: outset;"
"background-color : black;"
"border-width: 2px;"
"border-radius: 10px;"
"border-color: black;"
"font: bold 16px;"
"color: black;"
"min-width: 400px;"
"min-height: 0.75em;"
"margin: 0 1px 0 1px;"
"color:rgb(255,255,255);"
"padding: 6px;"
);
Afaik, you can’t place two labels on a regular QPushbutton. I also don’t think this is achieveable with standard CSS when the text is in the same block. I’d say subclass QAbstractButton to have two labels.