[Qt-interest] Help, Amazing to the QPainter, when I set some QFont to drawText, but the fontInfo is failed to change!
lvbing lvbing
lvbing1981 at gmail.com
Wed Dec 10 09:17:20 CET 2008
Hi All,
I have a program when I want to draw some text to my paintdevice!,
I create a new font and user setFont function to set into my painter,but
when I use the fontInfo
to view the font infomation,the font infomation is still the old font,
the code like this:
void Fun(QPainter* painter,/*......*/)
{
QFont font;
font.setFamily("..."); //some font I wanted
painter.setFont(font);
//do something
}
when I user (painter->fontInfo().family() to see what font the painter use,
and the font did not changed!
but sometime,the new font will be setted!
who knows how to user the function of the setFont in the class QPainter ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081210/48b07af1/attachment.html
More information about the Qt-interest-old
mailing list