Qt Creator autocomplete not updating for new UI widgets until (re)compile



  • Qt Creator 4.2.0 Based on Qt 5.7.1 (GCC 6.2.1 20160830, 64 bit)
    Running on Arch Linux.

    Having made a new "Qt Widgets Application", with the default settings, I added some widgets to the 'mainwindow.ui' file.
    I saved it, then added a slot for a button. In the function for said button I tried to get the value of some line edit, however, could not find it in the autocomplete in

    ui->
    

    Nor in

    this->ui->
    

    Compiling and running my application once made them available in autocomplete though.

    Is this the expected intended behaviour for autocomplete with regards to new UI widgets?


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    That's not intended nor expected.

    Does it also happen if you quit and re-open Qt Creator with your project ?



  • @SGaist It also happens when I restart Qt Creator. I've also tried a reboot, and it did not help.


  • Lifetime Qt Champion

    One thing you can try in between is to disable the clang code model. Go to "About plugins" and then you should find a check box about that. You'll return to the old code model.

    Before doing that, start Qt Creator on the command line to see if there's any error message printed that might be related to that.



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