开发者

Get rid of extra space on top of QLabel

As shown by the picture below, I have a QLabel with unwanted whitespace between the "Actual definition" and the text in the QLabel. I've tried setting the vertical alignment to AlignTop, setting the style sheet to QLabel{padding: 0 0 0 0px;}, but this is the end result:

Get rid of extra space on top of QLabel

How can I fix this?

EDIT While creating a test UI file, I discovered that the cause behind this was my setting the indent to 15. How can I keep the indent to the right without causing the indent to the bottom (and while keeping the alignment of the text to the top of the label)? It seems as if I can't just use i开发者_开发问答ndent anymore.


Instead of using indent, try using padding-left in a style sheet.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜