QCharts, "undeclared identifier"--what's wrong with it?
-
I wrote this line in my .pro file, and then, include these .h file successfully: :
but, it show me an error:
why it happens, I did same work in another project, and that project have no error.
Is it a bug? I have no mind right now, maybe somebody could tell me how to do? thanks -
@J.Hilk
Maybe I didn't say it clearly last time. I mean, if I change the .ui file, such as add a pushButton named MyBtn, and save it, it would ask me to do these: clean project -> run qmake. Otherwise you will get a error, it can't be identified.
I am pretty sure I needn't clean and run qmake, and MyBtn could be identified in Qt4.
-
@Donation It's not related to Qt, it is a QtCreator + qmake thing. Changes in ui files are often only recognised in C++ code in QtCreator after building the project. The reason is that the code model only parses C++ files not ui files, so first ui XML files need to be translated into C++ files (with ui_ prefix).