当前位置:网站首页>'function vtable for error: undefined reference to ... ' 问题的原因及解决方法
'function vtable for error: undefined reference to ... ' 问题的原因及解决方法
2022-07-29 05:26:00 【sg-expert】
QT中,类要支持信号与槽机制,需要继承自QObject并在头文件开头添加Q_OBJECT宏.
如果使用QtCreator创建类时,没有选择继承自QObject类或其子类,而在创建后手工修改继承自QObject并手工添加Q_OBJECT宏,则在编译时有可能会出现"function vtable for error: undefined reference to … " 错误.
解决方法: 把新创建的类文件从项目中移除(不要从磁盘上删除),然后再添加进项目工程,QtCreator就会重新解析此类,再编译就不再会出现上述错误.
边栏推荐
- What is the basic principle of Library collision and library collision attack
- IPv6表示方法与配置案例
- Understand the great changes of network security in five years
- Floating point addition and subtraction method of vivado IP core floating point
- Complex floating point multiplication of vivado IP core floating point
- 自动化测试的生命周期是什么?
- day03_ 1_ Process control
- 用神经网络实现手写数字识别
- 详解FIR滤波器和IIR滤波器的区别
- Right value reference and mobile construction
猜你喜欢

day15_ generic paradigm

day09_ Static & Final & code block & abstract class & Interface & internal class

day02_基本语法

Design of IIR filter based on FPGA

Hongke share | bring you a comprehensive understanding of "can bus error" (I) -- can bus error and error frame

通过os-shell引发的mysql拿shell的思考

Day16 set

基于FPGA的IIR型滤波器设计

如何在开发板上使用sftp命令访问sftp-server

四、 局域网和城域网
随机推荐
自动化测试的生命周期是什么?
What if the 80443 port of the website server has been maliciously attacked?
FIR filter design (1) -- using the FDATool toolbox of MATLAB to design FIR filter parameters
黑客攻击入侵服务器的6种常见方式
day12_ Multithreading
MQTT服务器搭建以及使用MQTT.fx测试
案例补充、ATM
Understand the great changes of network security in five years
Verilog中for语句的使用
Hongke education you want to enter the field of TSN? Hongke teaches you how to build TSN test system
FPGA—奇偶数分频和小数分频代码例程
Hongke solution | a unique solution to realize seamless integration at low cost in Digital Substations
Using STP spanning tree protocol to solve the problem of two-layer loop in network
三、广域通信网
Vivado IP核之定点数转为浮点数Floating-point
如何在开发板上使用sftp命令访问sftp-server
网络安全学习(一)
七、 下一代互联网IPV6
day10_异常处理&枚举
Idea practical shortcut key novice must see