{
Q_OBJECT
public:
~Tank();
qint16 getTankId(){return tankId;}
private:
qint16 tankId;
};
inline uint qHash(const Tank &key){
return qHash(key.getTankId());
}
class Tank : public QObject, public QGraphicsItem
{
Q_OBJECT
public:
Tank(qint16 id,QObject *parent=0,QGraphicsScene *scene=0);
~Tank();
qint16 getTankId(){return tankId;}
private:
qint16 tankId;
};
inline uint qHash(const Tank &key){
return qHash(key.getTankId());
}
To copy to clipboard, switch view to plain text mode
it give me a error:
error C2662: 'Tank::getTankId' : cannot convert 'this' pointer from 'const Tank' to 'Tank &' Conversion loses qualifiers
i have followed the examples in doc. I don't know what the hell going on...
any idea
thanks
Bookmarks