1. Use the QT plug-in corresponding to eclipse to create a QT Project
Add the directory corresponding to the C ++ library header file to include. For details, refer to the C ++ project created in eclipse.
Errors such as STD and cout in the CPP file cannot be parsed.
Solution: windows --> preference --> C/C ++ --> indexer --> cache limits
Change the value of absolute limit to a greater value, for example, change 64 to 256.
2. Create a C ++ project in eclipse
Modify the include parameter to introduce the corresponding header file directory of the QT library.
In the source file, if the q_object macro is used, that is, the class defining the signal and slot, You need to manually call the MOC tool. Run moc xx. H-o moc_xx.cpp in the source file directory. The generated file must be linked in.
If there is a XX. UI file, you need to manually call the UIC tool. Run uic xx. UI-O uii_xx.h in the current directory.