请教QMAP中使用结构体做key
//组信息结构
typedef struct GROUPPROP
{
int groupid; //组编号
QString desc; //组描述
int type; //组类型
bool operator< (const GROUPPROP& other) const
17 {
18 if (groupid < other.groupid) //类型按升序排序
19 {
20 return true;
21 }
22 else if (groupid == other.groupid) //如果类型相同,按比例尺升序排序
23 {
24 return type < other.type;
25 }
26
27 return false;
28 }
}uT_Property;
编译不通过,不知道哪里错了