PDA

View Full Version : QFontDialog - how to resize?



anderssonj
19th June 2007, 11:07
Hi,

I need to resize a QFontDialog as it's too big by default (as set by the line "resize(500, 360);" in qfontdialog.cpp).

However, the only public methods in QFontDialog are the static getFont methods. The constructor is private as well. In other words, I can't see how to get at a QFontDialog object so that I can call resize() on it.

Maybe I'm just too tired. ;) Can anyone help?

EDIT: using Qt 4.2

wysota
19th June 2007, 11:19
Why is it too big? Looks like the size is forced by the layout... If you want something simpler, use QFontComboBox.

anderssonj
19th June 2007, 13:40
Thank you for the suggestion, that's a good idea. I wasn't aware of that widget.

(The QFontDialog is too large for PDA screens).