He,YuanHui —— 业精于勤荒于嬉,行成于思毁于随

如果你喜欢一个事,又有这样的才干,那就把整个人都投入进去,就要象一把刀直扎下去直到刀柄一样,不要问为什么,也不要管会碰到什么。

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

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 keyword slots in 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 a ';' after the colon of the slots keyword in the class declaration.

Note: Remember to remove the ';' 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 a .ui file...

The Visual Studio code model parser only parses C++ sources, meaning that widgets or objects defined in .ui files will not be accessible. To workaround the problem, the Qt Visual Studio Add-in automatically generates C++ code from the .ui file by saving the file and running uic on 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 an .ui file. For more information, you can refer to the Modifying Project Properties section.

It still does not work...

You should refresh the code model, Intellisense. This is done by opening the solution explorer, invoking the context menu of the project and activating the item Update Intellisense.

 

posted on 2010-07-03 18:16  He,YuanHui  阅读(312)  评论(0编辑  收藏  举报

Add to Google