Auto-completion is disable



  • Hi,

    This is my situation :

    In my project I added an Qt designer graphic interface class which generates form.h form.cpp and form.ui files.
    I added some widgets (buttons, labels..) visually in my interface (form.ui).
    I edited visually the "objectName" for each widget.
    In my form.cpp I want use widget variable by calling them by her objectName .

    My question is : when I start writing the objectName of an widget, why the auto-completion is disabled ?

    thank you in advance!


  • Moderators

    I guess you are talking about auto-completion in Qt Creator?



  • Moved to tools forum as it seems to be related to creator. Feel free to move again if I proof to be wrong :-)



  • The form.ui file is compiled into an ui_form.h file that must be included in your cpp. The autocompletion needs that .h file to work, so you should build your project after saving the changes to the .ui file in order to regenerate ui_form.h. After that autocompletion usually works again.



  • Although ui_form.h is included automatically on the header of form.cpp it not works !

    But I added "ui->" before each variable and it works.

    thanks a lot !


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.