How to use Q_GLOBAL_STATIC with QMap
Solved
General and Desktop
-
Typedef the QMap to a new type and use this in Q_GLOBAL_STATIC
-
Typedef the QMap to a new type and use this in Q_GLOBAL_STATIC
@Christian-Ehrlicher Thanks a lot!
-
-
Typedef the QMap to a new type and use this in Q_GLOBAL_STATIC
@Christian-Ehrlicher said in How to use Q_GLOBAL_STATIC with QMap:
Typedef the QMap
I always found typedef at least a little confusing. With modern C++ we can use
using
to "typedef" new types.I would assume that also putting QMap<QString, MyType> into parentheses, i.e. ( and ), would work because this is a macro to be expanded.