[Qt-interest] Help, Amazing to the QPainter, when I set some QFont to drawText, but the fontInfo is failed to change!

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Wed Dec 10 14:33:16 CET 2008


lvbing lvbing wrote on Wednesday, December 10, 2008 9:17 AM:

> ...
> 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
> }

I don't see where you query the QFontInfo in your example ("Do something" is very generic). Provide a minimal complete example which shows what you are trying to do (especially *when* you are trying to query the QFontInfo!).

Cheers, Oliver




More information about the Qt-interest-old mailing list