1

Topic: To align the text at the image in QLabel

In QLabel it is possible to place simultaneously the text and the image as follows: ui-> label-> setText ("<img src ='c:/pic.png ' style ='vertical-align:middle; '> the Text"); And it is possible to align somehow this text vertically that it was accurately on image center? vertical-align:middle aligns the lower edge of the text under the image as on a picture, and it is necessary that was as on 2 Thanks

2

Re: To align the text at the image in QLabel

Hello, Michaels1, you wrote: M> In QLabel it is possible to place simultaneously the text and the image as follows: M> ui->> label-> setText ("<img src ='c:/pic.png ' style ='vertical-align:middle; '> the Text"); M> M> And it is possible to align somehow this text vertically that it was accurately on image center? vertical-align:middle aligns the lower edge of the text under the image, as on picture M> Image: LQTVY.png M>, and it is necessary that was as on 2 M> Image: tYenE.png M> Thanks I will answer you with the link, look for something like vertical-align. .. Judging by your pictures, alignment needs for the text to be set, instead of an icon