开发者

Get rid of extra space on top of QLabel

开发者 https://www.devze.com 2023-03-29 17:00 出处:网络
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 th

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

精彩评论

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

关注公众号