The reason is actually QT Creator IDE
Analyze why the previous error code is still reported. The root cause should be that the binary file compiled from the old code is still being run. Then just recompile the now modified code. Then the code must be recompiled after modifying it, otherwise the previous code will always be executed.
Code compilation in QT
The operation in Creator is "refactoring", which is the main reason why you suddenly can't adapt or can't find what to do.
The difference between compiling and building
Reference: https://zhuanlan.zhihu.com/p/367808125
I accidentally saw the reference article and it feels very good. The makefile file specifies the compilation order of files, while make manages the execution order.
Manually connect the slot signal through a component (I am not used to this translation)
I really don’t want to complain about this translation in Creator. It’s actually the relationship between code and component actions. Getting a slot and signal was really confusing for the first time.
After reconstructing the wrong code below, an error will appear after execution