【发布时间】:2015-04-08 02:11:24
【问题描述】:
我在 Windows 8.1 Pro x64 上使用 Qt 5.4 x86。在this example 之后,我正在尝试实现ElidedLabel 类。不知道我做错了什么,但示例中的代码本身正在生成
error: undefined reference to `vtable for ElidedLabel'
出了什么问题以及如何解决?我检查了Qt 5.4 documentation of QFrame,没有需要定义的纯虚函数。
【问题讨论】:
-
也许 moc 没有预处理你的代码,所以尝试从菜单中的 Build > Run qmake 命令。
-
@Chernobyl:是的,它有效!您能否将其发布为答案,以便我接受?
-
是的,当然,谢谢。