QtCreator can't Self-recognition new ui item
In QtCreator, I drag one QLabel into ui in design mode, then checkout to code edit mode，But I can't use the new QLabel pointer like this in ui class（In old version QtCreator can Self-recognition），
I must rebuid project to generate new ui_xxxx.h，then the UI item can be used normal.
My Qt version:
I guess you have the Clang Code Model enabled (Help > About Plugins > Clang Code Model). You can try to update Creator to 4.8 or even 4.9-beta (a release candidate is just around the corner).
@aha_1980 Thanks for your reply , but i didn't load clangCodeModel
I will try your suggestion to update QtCreator verion .
Try to manually delete the build directory, I often do this when I have compile o run problems that seem to be unjustified.
@RobinsonSir Just a note: what you posted is NOT necessarily the Qt version you're using, it's the version of Qt which was used to build QtCreator. To see which Qt version you're using go to the Kit you're using and check which Qt is selected there.
I think it's a QtCreator bug. I can write code like this:
and compile app ok without error, just QtCreator can't Self-recognition macLab, it doesn't have keyword color.
Like this, first row macLab is not self-recognition, it's color is black, it should be red color like second row.
But after I build or rebuild the project , macLab will have red color.
Some error info like this: