Answer the question
In order to leave comments, you need to log in
How lightweight is QFont?
Does it make sense to create objects of type QFont every minute every time you need to display something - using the QFont(family, size) constructor? Or, on the contrary, should they be cached?
The same for QFontMetrics.
Answer the question
In order to leave comments, you need to log in
Well, yes, you can create every time, judging by
Loading fonts can be expensive, especially on X11. QFont contains
extensive optimizations to make the copying of QFont objects fast,
and to cache the results of the slow window system functions it
depends upon.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question