// A.h file
class A{
public:
A(){};
private:
static const QMap<qstring, int=""> my_map;
}
class A{
public:
A(){};
private:
static const QMap<qstring, int=""> my_map;
}
After all includes, in cpp file, we initialize static member types.
#include "A.h"
// A.cpp file
const QMap<qstring, int=""> A::my_map = { {"a",1} ,{"b",2} };</qstring,>
A:A
{
}
// A.cpp file
const QMap<qstring, int=""> A::my_map = { {"a",1} ,{"b",2} };</qstring,>
A:A
{
}