How to restore a default size of the created buttons(custom plugin of Qt Designer) on the form? Rebuild ui file with default parameters of widgets.



  • I have created a custom plugin for Qt Designer it simply QPushButton class with corrected size of button that creates(modified default values of the size), but if i have a many forms with this buttons(with different size each button) and i need to restore their size to default (wich previously was generated in ui file when the button is created) it is possible? If possible then how? I could provide any information if needed.



  • The size of a QPushButton is driven by the layout you place it in, the minimum/maximum size constraints it has, and its size policies. The closest thing that a button has to a 'default' size is the value computed and returned by sizeHint(), which is driven by the button text, icon etc.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.