Reputation: 1107
I have a QLineEdit
which I have place a QPixmap
on and at the end of the LineEdit
. Is there a way where I can tell the LineEdit
where to consider the end of the widget so that text is not drawn on top of the picutre?
All good the answer is setTextMargins()
Upvotes: 1
Views: 158
Reputation: 4674
The LineEdit is a rectangular box - set its size correctly and everything should be fine, otherwise you might want to recheck your layouting.
Upvotes: 0
Reputation: 1132
You can use QLineEdit StyleSheet property.
padding-left: 10px;
padding-right: 10px;
Upvotes: 1