PDA

View Full Version : QPushButton's text cut off on other computers



vonCZ
11th November 2008, 17:07
I'm using the default font for the text on many QPushButtons in my project. I've sized the buttons so the text fits the way I like it.

When I view the application on my test/deploy computer, the text looks the same as on my development computer. I've recently discovered, however, that on some computers--with various graphics cards/display resolution settings--the text is often cut off in the horizontal direction, and sometimes vertical. Is there a way to fix this, besides generically increasing the button sizes and/or decreasing the text size?

Boron
11th November 2008, 18:42
Does a "prefered" sizePolicy in horizontal direction, instead of "fixed" help?
"Minimum" could also help.

caduel
11th November 2008, 20:41
and in case you are not using layouts sofar: start using layouts (and as has been suggested: stop using fixed sizes).
You can never rely on a font being available on all platforms, or (if available) being rendered pixel-true on all machines. Different resolutions etc are another reason. Maybe some people have worse eyesight and will want to increase font sizes...