linux eclipse qt5 ui_helloworld.h,Windows-Qt-EclipseCDT 环境问题集 (转载)

@echo offremrem This file is generated by the installerrem

echo Setting up environment... echo -- Using MinGW in: D:/Qt/4.6.2_for_mingw/bin;D:/Qt/mingw/bin;

set PATH=D:/Qt/4.6.2_for_mingw/bin;D:/Qt/mingw/bin;D:/Qt/4.6.2_for_mingw/libset PATH=%PATH%;%SystemRoot%/System32

echo Starting eclipse...

cd D:/Qt/eclipse-cpp-galileo-SR2-win32/eclipsestart eclipse.exe -clean

exit

now I can debug qt program in eclipse.

问题6:method setupUi could not be resolved

eclipse不能识别ui.*,报错。例如:

HiI'm working on Eclipse IDE with qt4 plugin. Everythings work fine, all programs are compiling well, with no errors from compilator.But I have one very annoying error which comes from Eclipse IDE.syntax checker underlines ui.setupUi(this); with message: Method setupUi could not be resolved. This error have no matter for my application, and its work fine. but i cant stand to see the red underline in my project. I think that the problem is with my eclipse configuration.here is the class with that error:

Qt Code:  #include "qtmyapp.h"

QTMyApp::QTMyApp(*parent)

:(parent)

{

ui.setupUi(this);//

}

QTMyApp::~QTMyApp()

{

}

#include

#include "ui_qtmyapp.h"

class QTMyApp:public

{

Q_OBJECT

public:

QTMyApp(*parent=0);

~QTMyApp();

private:

Ui::QTMyAppClassui;//

};

解决方法:

Re: Eclipse error - method setupUi could not be resolved

Hi,I had exactly the same error. I found this solution:1 - Go to your project's properties [alt+enter];2 - Go to left menu option C/C++ general->Indexer;3 - Check all check boxes (just like the picture).

uid-20622737-id-3172681.html问题7:如何使用release编译解决方法:project properties->C/C++ Make Project->Make Builder->Build(Incremetal Build) 属性 修改为release

问题8:调试时会在进入main之前,会停住。提示为:

No source available for "main() at 0x401729"

解决方法:Debug Configurations->Debugger->不要选中Stop on startup at main。非常莫名其妙的玩意

问题9:如何安装Windows-Qt-EclipseCDT环境

解决方案:现在不需要单独下MinGW了,也不需要自己编译Qt才能调试了,只需要安装QtSDK,EclipseCDT和

问题10:如何使用头文件索引文件管理头文件

这是一个经典技巧,除了微软的筛选器(虚拟文件夹)以外,大部分IDE还是通过物理文件夹组织头文件,所以如何组织头文件是非常费力的。一般我们都是用一个索引头文件来表示,例如

src/xxx/yyy/zzz/A.h

src/xxx/yyy/zzz/A.cpp

src/aaa/bbb/ccc/B.cpp

如何给B.cpp导入A.h,如果使用相对路径,管理大量头文件非常复杂

解决方案:我们可以写一个索引头文件

inc/A.h

在其内部 #include "../src/xxx/yyy/zzz/A.h"

在B.cpp中可直接导入

#include "A.h"

然后只需要在*.pro中使用

INCLUDEPATH += inc

另外,需要在project->Proeperties->C/C++ Include Paths and Symbols

点Add External Include Path...

导入inc的目录,这样才能使用自动完成功能

问题11:为何配置了图标路径,结果不显示

解决方法:qrc中使用的是前缀+相对路径的描述方式,例如:

images/01042.png

他在项目中的相对路径就是images/01042.png,而他最终路径则一般是前缀+相对路径的合成路径,所以为了保持一致,一般我们把前缀设置为/

问题12:STL自动完成不能提示,或STL代码不能编译

解决方法:

1.windows->preferences->Build->Environment->添加两个变量

CPLUS_INCLUDE_PATH

C_INCLUDE_PATH

2.project->Proeperties->C/C++ Include Paths and Symbols

点Add External Include Path...

添加如下路径

3.右键点项目,选择index->rebuild

问题13:程序总是停在ntdll的某个函数,而未进入main函数

比如:7 ntdll!LdrAddRefDll()  0x7c92ebab

解决方法:打开程序的Debug Configurations,修改Debugger Options:不要选"Load shared library symbols automatically"。

问题14:Qt的帮助文档在哪里

解决方法:Desktop\Qt\4.7.4\mingw\bin\assistant.exe

问题15:Qt帮助文档为什么打开是空的

解决方法:你安装目录下有没有这个文件 qt.qch 若有 这样操作 在edit->preferences->documentation 添加那个文件 再检索

问题16:调试时,打断点无法命中

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值