目录
1 声明
//A.h
extern QMap<ToolTask, QString> KToolTaskTxt;
2 初始化
全局区域初始化
//A.cpp
QMap<ToolTask, QString> KToolTaskTxt={
{I_ADD_SCREW,"add screw"},
{I_ADD_ARROW,"add arrow"},
{I_ADD_LABEL,"add label"},
{I_MEASURE_LINE,"measure line"},
{I_MEASURE_MULTILINE,"measure multiline"},
{I_MEASURE_ANGLE,"measure angle"},
{I_MEASURE_SQUARE,"measure square"}
};
3 使用
#include "A.h"