View Full Version : How to resize pushbutton to fit text in mac os

1st December 2011, 12:36
I am trying to make a QPushbutton that will increase in size to fit the text platform independently.
The text can be very long and I need the button to size itself so that all the text can be visible.

For example: I have a button with text "Restore defaults" , it is visible in win 7 . When i run this in mac os , only a part of the text ("tore defaults") is displayed.
Could anyone tell me how to solve this problem, to make all the text appear on the button.

1st December 2011, 14:41
When you build widget with use of layout this should be done automatically out of the box.
You may have to use size policy - set it for main window / central widget.