PDA

View Full Version : How to set font of QString??



sudhansu
9th February 2010, 12:55
Hi All,
I've a tool Button of size(100,80). in this button i'm showing an icon, and a string below the icon. String will differ in different language. How to get the string font? so that i can display the text at the centre of toolbutton?

e.g.
string may b "Previous" or "Next". I need to allien the string in centre.

boudie
9th February 2010, 14:32
Qt handles that for you, so you don't have to align the text yourself. Try it with different texts.
If you need special looks for your button, use a stylesheet.
Also, if you make correct use of layouts, then the width of the button can be adjusted.