Auto Complete (suggestion) not work in SIGNAL QT creator 4.8
-
Hello,
Iam using the last version of QT 5.12.0 and before I was using QT 5.11.2, when I write a code for some projects I notice that when I try to write a line of code which contains signal and slot like this
connect(key, SIGNAL(activated()), this, SLOT(keyPressed()));
I always use the QT creator Ctrl + space as any other IDE to get the suggestion to open a list and I choose the word but when I press ctrl + space in the signal part I can't find the list and he gives me this error here
this problem happened since QT 5.11.2, I have QT 5.11.0 and it worked fine with no problem it gives me a list with all the SIGNALs in this class, also another problem when I write the slot it gives me the list of all functions the old QT version just give me only the slots.so what is the problem make this happened, is it a problem in the way I use? or it's a setting issue I should edit for the new versions of QT to make it work like the old one or it's a bug?
because it's really annoying and let me take time for writing my code, at the same time I always update my computer with the last version of QT and I want to use the last version the updated one.
Thanks in advance.
-
Is this issue happening for every class in Qt library ? Is it specific to QHotKey ? It may be just Qt creator issue(not Qt library issue). May be you can updated Qt Creator. It should work.
-
Hi @AmrCoder,
That is tracked by QTCREATORBUG-20737.
You can either disable the Clang Code Model, as @jsulm suggested (Help > About Plugins > Clang Code Model) or switch to the new Signal&Slot syntax (which I would recommend, but unfortunately the completion is not perfect there either: QTCREATORBUG-13558).
Regards
Regards
-
@AmrCoder Problem is with new version of clangCodeModel in modules. Somehow auto fill dont work anymore, but there is something else very useful, like prediction of what should be typed on.
With turned off clangCodeModel Auto fill is working, and for example void ```test( qstring a, int b, QObiect c )
is completed from for example base class, it works that when I typevoid test(| )
and when cursor is close to open bracket, it shows hint of original function declaration, but when cursor is moved
void test( |)
then is showing examples of auto completion or even is replacing whole line from original virtual function.
But when clangCodeModel is On then it is not working anymore, like this module is override the basic behavior.
I need remind that clang module have smart prediction but is colliding with auto fill whole line inside of brackets.