qt gui not updating error

while working in a qt project, I faced a problem where the gui components(pushbutton labels, etc) that have been added and saved do not seem to be recognized in the .cpp files.

For example, I have added a QLabel named “ql1” in the UI file.

In the main .cpp file, I cannot reference this QLabel with something like “ui->ql1”. Other components that existed originally do work but this doesn’t.

I found that this was because I left the ‘shadow build’ option enabled in the project configuration. I had been fiddling with this in the past.