Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译遇到错误 ,没有QTipLabel这个类 #1

Open
tsuibin opened this issue Apr 12, 2013 · 7 comments
Open

编译遇到错误 ,没有QTipLabel这个类 #1

tsuibin opened this issue Apr 12, 2013 · 7 comments

Comments

@tsuibin
Copy link

tsuibin commented Apr 12, 2013

tools/tooltip.cpp: In static member function 'static void ToolTip::showText(const QPoint&, const QString&, QWidget*, const QRect&, bool, qreal, int)':
tools/tooltip.cpp:349:13: error: expected type-specifier before 'QTipLabel'
tools/tooltip.cpp:349:13: error: expected ';' before 'QTipLabel'
tools/tooltip.cpp:365:43: error: 'qFadeEffect' was not declared in this scope
tools/tooltip.cpp:367:45: error: 'qScrollEffect' was not declared in this scope

@yuezhao
Copy link
Owner

yuezhao commented Apr 12, 2013

猜测是你的Qt版本里面定义了QT_NO_EFFECTS这个宏。试试在tooltip.cpp里面将它#undef掉。

@tsuibin
Copy link
Author

tsuibin commented Apr 15, 2013

tools/tooltip.cpp:57:32: 致命错误: private/qeffects_p.h:没有那个文件或目录
编译中断。

@yuezhao
Copy link
Owner

yuezhao commented Apr 15, 2013

我用的是Windows下的Qt4.7.2,没有遇上这问题。你的问题应该先查找一下开发环境中有没有qeffects_p.h这个文件。如果找不到,可以到EzViewer源码的tools/tooltip.cpp中,注释掉#include <private/qeffects_p.h>,同时define QT_NO_EFFECTS,应该能解决问题。我接下来会把这个头文件的依赖去掉,以防止出现兼容性问题。

@tsuibin
Copy link
Author

tsuibin commented Apr 15, 2013

我的是4.8的,没有这个文件,qt在新版里对effect的很多代码有修改

@tsuibin
Copy link
Author

tsuibin commented Apr 16, 2013

注释之后就没有QTipLabel这个类了
-o tooltip.o tools/tooltip.cpp
tools/tooltip.cpp: 在静态成员函数‘static void ToolTip::showText(const QPoint&, const QString&, QWidget_, const QRect&, bool, qreal, int)’中:
tools/tooltip.cpp:350:13: 错误: expected type-specifier before ‘QTipLabel’
tools/tooltip.cpp:350:13: 错误: expected ‘;’ before ‘QTipLabel’
tools/tooltip.cpp:365:43: 错误: ‘qFadeEffect’在此作用域中尚未声明
tools/tooltip.cpp:367:45: 错误: ‘qScrollEffect’在此作用域中尚未声明
make: *_* [tooltip.o] 错误 1

@yuezhao
Copy link
Owner

yuezhao commented Apr 16, 2013

已经修正了这个问题,你更新到最新提交试试。

@tsuibin
Copy link
Author

tsuibin commented Apr 19, 2013

可以编译通过了,但是没有菜单和特效了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants