1) Determine the size of the text, e.g. using QFontMetrics.
2) Create a QPixmap with that size.
3) Paint the icon into that pixmap on the wanted position.
4) Paint the text on the pixmap.
5) Use that pixmap on the button

Cheers,
_