How are QPen and QBrush expencive?
Unsolved
General and Desktop
-
Every allocation which you can avoid makes sense.
-
@Christian-Ehrlicher do they really allocate some resources? Or they are some structure like
struct Brush { QColor color; ... };
-
@Dmitriano QPen and QBrush are classes as described in the documentation.
-
@Dmitriano
In addition to @Christian-Ehrlicher: don't forget that both of these are shared instance data, as per many Qt classes in https://doc.qt.io/qt-5/shared.html, so memory/resource usage may be less than you think.