I’m using QTCreator on the Mac, and I’m trying to get used to it. If I type in the following:
QWidget *w = new QWidget(
And press Control+Space, I get a tooltip (i.e., in yellow) that has a “1 of 3” possible constructor prototypes I might want to use. I can use arrow up/down to see the different prototypes.
But how do I choose one to have it completed for me? I’ve tried hitting return, and tab. Neither accept the completion.
What am I missing?
That is sort of an API helper that will stay up as you type so you can see what parameter types the function is expecting. What it is showing is not code completion options but the function as it is declared. In this case, it is showing the three different overloads of the QWidget constructor.
There are often many possible values for the actual parameter that can be passed for a single argument. For functions with more than one parameter, the combinations grow quite large so it isn’t reasonable to try to present a single suggestion.
As you start to type something in for each parameter, code completion will kick in.