Results, as shown on the left is running, on the right is the design drawings;
Pray for god to reassure
CodePudding user response:
Squeeze HorizontalSpacer will button on the right position on the left, three methods:1/will HorizontalSpacer take out, leave enough space to the right;
2/set the HorizontalLayout controls space scale, make the space of the button is not affected;
3/to fix the width of the button, you simply set the size of the Icon Icon, not the button size;
Satisfaction and post, thank you!
CodePudding user response:
See if call autoFillBackground functionCodePudding user response:
You first set the pushbutton into a fixed size, the size of the button will not because the layout is changedCodePudding user response:
The QPushButton setIconSize method is used to adjust the size of the Icon