Important: Please read the Qt Code of Conduct -

Qt Creator - autocompletion not working

  • I'm just starting out with Qt and have a general question.

    First I create a C++ gui app, then I go to the ui designed and add a pushButton. I go back to the mainwindow.cpp file, and type in "ui->" this point the autocompletion pops up, but my new "pushButton" item is not in the list. If I manually type in "ui->pushButton->setText("hi");", it will compile and run. Why doesn't my new object appear in the autocomplete list?

    I've watched several videos about Qt on youtube and in all of those the autocompletion works for added ui objects.

  • After you edit something in the Qt Designer, you have to run your project 1 time before you can see the changes in Qt Creator.

Log in to reply