PyQt5 – Change size of Push Button
In this article we will see how to change the size of push button. There are basically two ways in order to change the size of button i.e using
resize method and
The main difference between them is
resize method will only resize the push button. on the other hand
setGeometry method will change the size and also set the position of the push button.
Syntax : button.setGeometry(left, top, width, height)
Argument : It takes four integer as argument, first two are the position and second two are the size.
Action performed : It sets the position and the size of push button.
Syntax : button.resize(width, height)
Argument : It takes two integer as argument i.e width and height.
Action performed : It sets the size of push button
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course