After an error is reported when writing and running the code in QT6, the error before modification is still reported when re-running after modification.

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.
Insert image description here

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.
Insert image description here
After reconstructing the wrong code below, an error will appear after execution

Insert image description here

Guess you like

Origin blog.csdn.net/weixin_43794311/article/details/132496918