Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using spacer in a layout squashes buttons #1

Open
mwojt-platige opened this issue Jul 20, 2022 · 1 comment
Open

Using spacer in a layout squashes buttons #1

mwojt-platige opened this issue Jul 20, 2022 · 1 comment
Assignees

Comments

@mwojt-platige
Copy link

Hi,

When using multiple QPushButtons in a layout with a spacer, they appear to be squashed like this:
Screenshot 2022-07-20 at 12 13 01

My workaround was to add a min-width of 70 pixels to the QPushButton class, but maybe there's a better solution. Maybe adding a default padding in each direction should work.

@leixingyu
Copy link
Owner

Yeah, I can add padding for left and right. But do note that, if the width of the button isn't wide enough, the label would be partially obscured by the padding. Either way, you might need to specify a minimum width.

@leixingyu leixingyu self-assigned this Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants