Use the QT library in eclipse on Linux

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.