PDA

View Full Version : [Solved]How to make Qt creator hint (autocomplete) inherited functions?



h5nc
26th June 2012, 06:26
Hi all,

I am using Qt Creator but I found that when I use an instance or a pointer of a inherited class, it can only hint the funcs, vars of its own class. How can I make it parse the base class too and display all functions that inherited?
For example:


class A
{
public:
void fooA();
};

class B : public A
{
public:
void fooB();
};

B *pB = new B();
pb->


After hitting -> or . in my keyboard it only hints fooB(). It should hint fooA() too as in Visual Studio...

Similarly, it cannot understand a class that is not included directly in B.h but already included in A.h




SOLVED: OK, I solved two silly problems by myself now.... Simply because I used precompiled headers... I should include Stdafx.h

SmitLinuxMan
30th March 2018, 07:44
I had the same problem and I solved it by enabling clangcode model

http://doc.qt.io/qtcreator/creator-clang-codemodel.html