Hi All,

I'm hoping this is not too obvious a question. A static QList can be initialised outside of any method:
Qt Code:
  1. class A {
  2. public:
  3. A();
  4. ...
  5. private:
  6. static QList<int> m_list;
  7. static QMap<int,QString> m_map;
  8. ...
  9. }
To copy to clipboard, switch view to plain text mode 
and in the cpp file
Qt Code:
  1. A::A() { }
  2. ...
  3. QList<int> A::m_list = QList<int>() << 1 << 2 << 4;
  4. ...
To copy to clipboard, switch view to plain text mode 
but I cannot see a similar way to initialise the QMap. Can it be done or is it a job for the constructor?

Regards,
Chris W