Qt Visual Studio add-in: Frequently Asked Questions

Source: Internet
Author: User
Frequently Asked Questions


Why is Code Completion not working?


You're implementing a slot...

Visual Studio can only provide code completion as long as it understands the code. Unfortunately, it does not know how to handle the QT keywordSlotsIn the header file. This means that the respective function body is foreign to the code model and no code completion will be provided. You can workaround the problem be placing';'After the colon ofSlotsKeyword in the class declaration.

Note:Remember to remove';'When exporting the project as the code might not with older UNIX compilers.

 class MyClass {     Q_OBJECT public slots:;     void doSomething();   ... };


You are referencing objects from. UIFile...

The Visual Studio code model parser only parses C ++ sources, meaning that widgets or objects defined in. UIFiles will not be accessible. To workaround the problem, the QT Visual Studio add-in automatically generates C ++ code from. UIFile by saving the file and runningUICOn it. this step is done everytime the project is built. if the Code Completion does not work, try to rebuild the project. it is possible that you have to wait some time, before Code Completion fully works after updating. UIFile. For more information, you can refer to the modifying Project Properties Section.


It still does not work...

You shoshould refresh the code model, intelliisense. This is done by opening the Solution Explorer, invoking the context menu of the project and activating the itemUpdate intelliisense.

 

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.