0
votes

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

1
Your line edit belongs to a horizontal layout, therefore you cannot change its size directly. Try to set its sizePolicy -> vertical sizetype to Expanding or MinimumExpanding. - Johannes Flügel
Thanks for the explanation! I've already tried changing the sizePolicy to both of those - no change - Yonder

1 Answers

1
votes

Ah!

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

After removing this - setting sizePolicy to expanding worked wonders!