qt creator bug : list of widgets in ui not updated in cpp code
-
Hi. I'm new in Qt.
Whenever I make new widget in .ui file and change the objectname of it , It will not appear in .cpp file ( not appear by ctrl+space )
I was saved the project and rebuild it but the issue was not solved.
So I have to close project and open it again to refresh list of widgets in .cppIs it the Qt creator bug or should I have anything to update list of new widgets from .ui into .cpp ?
-
Hi. I'm new in Qt.
Whenever I make new widget in .ui file and change the objectname of it , It will not appear in .cpp file ( not appear by ctrl+space )
I was saved the project and rebuild it but the issue was not solved.
So I have to close project and open it again to refresh list of widgets in .cppIs it the Qt creator bug or should I have anything to update list of new widgets from .ui into .cpp ?
Hi and welcome,
you need to make sure that you re-run the
uictool in your build.
The user interface compiler translates your*.uifile into usable C++ headersIt should run automatically if you have the
AUTOUICCMake property set, which should be the default when you create new projects via QtCreator's project wizard.Edit:
Also, if your correct name is indeed in your header file, but won't be recognized in your code through
ui->something, it's a code model / IntelliSense issue, which might take some time until it's updated.
Just because it's not directly changed in the code model, it does not mean that the updated code will not compile.
Might happens from time to time.