PDA

View Full Version : Hide private and protected members from autocomplete dropdown



rubikon
15th February 2012, 09:45
Hello.

Is it possible to hide the private and protected members when using autocomplete in Qt Creator?

e.g. If I using a membervariable which is an object I don't care about the private and protected members of this class because I can only use the public ones.

wysota
15th February 2012, 09:53
I think it would be quite complicated to implement since protected members can be acceessed by subclasses and private and protected members can be accessed by friend functions and classes. So the visibility highly depends on the context. You can work around this by prefixing all your non-public members (e.g. with "m_").