Intelligent code completion in Qt Creator

Is Qt Creator a true end to smart code like Intellij IDEA? For example:

void main() { QString simpleVariableName = "First string"; QString anotherVariableName = "Second string"; // If I type "variable" and press Ctrl + Space I would like to get // all matching variables(simple and another) in popup list. In // IDEA it works, but Qt Creator show nothing. } 

I heard the Clang Code Model plugin is connected and it is already installed in my version 3.4.0. But that doesn't make sense, I still have the default behavior.

Is there a way to get really smart code completion?

+8
c ++ code-completion qt-creator
source share
1 answer

Is there a way to get really smart code completion?

Well, the answer to your question is "Yes." You can implement the plugin or add this feature to an existing one. But right now, the only plugin used by default in QtCreator and dealing with code completion is ClangCodeModel.

The ClangCodeModel plugin does not have such a function.

On the other hand, having the installed plugin is not enough for it to work, you need to enable it.

Go to HelpAbout Plugins and make sure the “Download” checkbox for the ClangCodeModel plugin is checked.

The plugin improves code completion, but remember that this plugin is experimental and not complete.

Checkbox for the ClangCodeModel plugin is checked!

Links of interest:

Code completion is not so smart.

Clan-Based Code Model

+5
source share

All Articles