How to adjust size of text inside QPushbutton
I create buttons (my class is subclassing QPushbutton) on screen. The size of them is setted by user, but I want to check if size of button is enough big for the text in button. If not it should resize. Is there any way to check that?
You can use "QFontMetrics::width":http://qt-project.org/doc/qt-5/qfontmetrics.html#width to get the width of the button text and compare it with the width of the button.