static const QFont using QFontDatabase?
-
Hi,
Why do you need a static QFont ?
-
That's what I thought but what would be the use of that global QFont ?
-
Are these functions in separated classes ?
-
Then why not just make it a member and load it at construction time ?
-
@SGaist I could do that, but it's the same font for all instances. So it would be kind of a waste of space.
So it would be kind of a waste of space.
Hello,
I suggest answering these two questions for your own peace of mind:- How much space would you expect to save if you put it in a static variable?
- What do you gain or lose by making it a static and is it worth the effort (in work time/planning time)?
Kind regards.