I use static open variables of type QMap. I fill with the help of a static function that returns a QMap.
code:
// *.h ... public: static QMap<uchar, QString> bDict; private: static QMap<uchar, QString> createMapDictionaryB(); ... ////////////////////////////////////// // *.cpp ... QMap<uchar, QString> ArrayNC::createMapDictionaryB() { QMap<uchar, QString> map; map[1] = "Значение 1"; map[3] = "Значение 2"; map[4] = "Значение 3"; ... return map; } When compiling an error
error: variable 'QMap bDict' has initializer but incomplete type
error: invalid use of incomplete type 'struct QMap'
error: return type 'struct QMap' is incomplete
#include <QMap>in the hider? - Sublihim