How to resize a button in a grid layout?
-
wrote on 5 Mar 2022, 00:20 last edited by judethedude 3 May 2022, 00:28
Hi everyone,
I've been learning PyQt5 and it's been a fun experience so far. I'm working with QDesigner currently and have a question about how to resize a button within a grid layout:
I'd like to shrink the size of the first column (or button directly?)...but I can't figure it out. I've tried using column stretch:
But it seems there is a minimum size for that first column, anyone have any advice?
Edit: I should mention, column stretch has worked perfectly for my other grid layout GroupBox:
Edit2: Bonus question :)
Any idea how I can reduce this blank space?
I tried messing with the top margin but that didn't have the desired effect. Thanks again.
Regards,
Jude -
wrote on 5 Mar 2022, 00:47 last edited by mpergand 3 May 2022, 00:51
Hi,
For the button you can set a maximum width .
For extra spaces, check all the layouts contentsMargins and spacings settings.
Or add a vertical spacer at the bottom. -
Hi,
For the button you can set a maximum width .
For extra spaces, check all the layouts contentsMargins and spacings settings.
Or add a vertical spacer at the bottom.wrote on 5 Mar 2022, 16:35 last edited by@mpergand
Thanks for the reply, I will try that out.
1/3