Priority: P2: Important
Affects Version/s: Qt Creator 4.8.2
Fix Version/s: None
Component/s: C/C++/Obj-C++ Support
Environment:Windows 10 x64
(I'm using example from my previously reported bug, just because I can use screenshot from there to demonstrate expected behavior. I tried to reproduce "Spin Box Delegate Example" from standard examples)
Steps to reproduce:
- Create new Qt Widget Application
- Add new C++ class (named Delegate, for example), with Base Class: QObject
- In the header file of this class Include QItemDelegate
- Change inheritance of this class from QObject to QItemDelegate
- In "public:" section start typing "QWidget *createEditor(" – or copy completed version of this string from attached code and try typing next string "void setEditorData("
Editor will suggest default parameters, inherited from parent class as auto-completion (see screenshot "old.png")
It will ignore inherited parameters from parent class and show regular suggestions as auto-completion (see screenshot "new.jpg")
Partly (see update section below) solving by deactivating the Clang Code Model with Help > About Plugins > Clang Code Model
Update: just noticed, that editor doesn't autocomplete even the name of the function (setEditorData), so that could be the reason.
Also, with Clang Code Model turned off, when it autocompletes the name of the function (setEditorData), it automatically inserts parenthesis semicolon, but NOT autocomplete parameters. But if you delete this auto-inserted symbols - (); - and type parenthesis by yourself - only then editor will suggest auto-completion for parameters.
Also, I found a proper way when everything works as expected (auto-completing name of the function and auto-inserting parameters even without disabling Clang Code Model) - use full name for the function, with the name of the class, like this - Delegate::setEditorData.
But I suppose it should work even without it, because standard included example "Spin Box Delegate Example" isn't using full name for the function declaration, and, as it shown in attached screenshot - it used to work before.