ezviewer icon indicating copy to clipboard operation
ezviewer copied to clipboard

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

Open tsuibin opened this issue 11 years ago • 7 comments

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

tsuibin avatar Apr 12 '13 16:04 tsuibin

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

yuezhao avatar Apr 12 '13 18:04 yuezhao

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

tsuibin avatar Apr 15 '13 10:04 tsuibin

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

yuezhao avatar Apr 15 '13 12:04 yuezhao

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

tsuibin avatar Apr 15 '13 12:04 tsuibin

注释之后就没有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

tsuibin avatar Apr 16 '13 09:04 tsuibin

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

yuezhao avatar Apr 16 '13 13:04 yuezhao

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

tsuibin avatar Apr 19 '13 13:04 tsuibin