I have a function that needs to access the value of a qmap pointer object.
void SomeClass::SomeFunction(QMap<qint64, bool>* times, qint64 startPoint, qint64 endPoint)
{
//Here I want to check the value at an existing index.
}
What I tried:
times[key];
and:
×[key];
and:
×[key] == 0;
Both give a wrong result (the value is true but i am expecting false).
in qt the qmap has a method for that: contains
so the way to go would be:
update:
to get the value of the pointer you need to be aware of the operator precedence i.e. you have to do:
so in your case