I'm trying to acces the cityMethod() inside the class City.
class City
{
void cityMethod() { }
}
So, I do:
map<string,City> mymap;
City c;
mymap["Madrid"] = c;
Now, when I do this:
mymap["Madrid"].cityMethod();
Ok, it works. But the IDE(Qt) doesn't recognize the "cityMethod". Am I doing something wrong? Is that compiler issue?
This feature does not seem to be supported by Qt Creator. There's an open issue about it on http://bugreports.qt.io/.
It does work when using the
ClangCodeModel
plugin though. To use it, go to Help > About Plugins and activate the plugin there:Then, enable its use in the options. Tools > Options > C++ > Code Model
You might experience performance issues with the Clang code model, but it does work: