Can you use a pointer as a key in a QHash?
Can you use a pointer as a key in a QHash?
Sure. You don't even need to provide a qHash() overload because one is generated for you by the template. Why do you ask?
Jeffb (14th March 2012)
Just wanted to make sure.
Had to decide whether to use a QMultiHash of values to Node ptrs or a QHash of Node ptrs to values.
The second one allows me to remove a row without having to iterate through the results of a find.
Thanks for that.
Jeff
Bookmarks