Yonder
Yonder

Reputation: 739

Set height of QLineEdit

I'm trying to set the height of my QLineEdit box - to match my button next to it. No matter what I try I can't seem to get it to change.

I've tried changing the sizePolicy to expanding, setting minimum, maximum and baseSize - height to any value, no effect.

I've tried to add a qss rule - with height to any value - no effect.

I've tried to put it in a QFrame wrapper - setting a size on this - and try to make the QLineEdit box expand to fill up this - no effect.

Any ideas?

Skärmavbild 2020-04-28 kl. 10.45.33.png

Upvotes: 0

Views: 3130

Answers (1)

Yonder
Yonder

Reputation: 739

Ah!

I found the culprit! I had a line of code running: element.setFixedHeight(..)

After removing this - setting sizePolicy to expanding worked wonders!

Upvotes: 1

Related Questions