In this article we will see how to change the text style or size of Push Button.
QPushButton is a simple button in PyQt, when clicked by a user some associated action gets performed. For adding this button into the application, QPushButton class is used.
In order to set font we will use
setFont method wich takes QFont object as argument.
Syntax : button.setFont(QFont(‘Arial’, 15))
Argument : It takes two argument first is font name and other is integer which refer to size of text.
Action performed It changes the size and font of text.
- PyQt5 – How to change the text of existing push button ?
- PyQt5 – Change size of Push Button
- PyQt5 – Adjust the size of push button according to the text
- PyQt5 – How to change font and size of Label text ?
- PyQt5 – Change color of Push Button
- PyQt5 | How to get the text of Push Button ?
- PyQt5 – How to create and get the help text of Push Button ?
- PyQt5 – Get the size of push button
- PyQt5 - Font and size of content in Radio button
- Python PyQt5 – How to change font and size of Status Bar Message
- PyQt5 – Change text in Radio Button on click
- PyQt5 - Change text of pre-existing Radio button
- PyQt5 - Change the size of radio button
- PyQt5 - How to change the spacing between indicator and text part of Radio Button ?
- PyQt5 - How change size of indicator in Radio Button
- PyQt5 - Change the size of Radio button according to content length
- PyQt5 - How to change style and size of text Progress Bar ?
- wxPython - Change font of Radio Button
- wxPython - Change Button Label Font
- wxPython - Change Font colour of Radio Button
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.