在Qt中,当派生类需要用到信号与槽机制时,有两个要求。

1、该类派生自QObject类。

2、类中有Q_OBJECT宏。

本次报错的原因就是因为没有在类中添加Q_OBJECT宏。

而我的出错原因更傻逼,清清楚楚知道需要添加Q_OBJECT宏,但是却手残写成了这个。

error C2338: No Q_OBJECT in the class with the signal (NodeCreator.cpp)的更多相关文章

  1. Qt error C2338: No Q_OBJECT in the class with the signal错误解决办法(无法编译过信号与槽)

    由于没有继承QObject类而引起的 只需继承QObject类即可 如果已经继承了QObject类,编译还出现错误 将QObject类放在最前面继承:public QObject 最后即可编译通过

  2. Qt5.编译错误.error: C2338: The slot requires more arguments than the signal provides.

    1.Qt563x86vs2015,遇到如下 编译错误: error: C2338: The slot requires more arguments than the signal provides. ...

  3. 编译时错误之 error C2338: tuple_element index out of bounds

    part 1 编译器 vs2015 VC++. 完整的错误信息粘贴如下: d:\program files (x86)\microsoft visual studio 14.0\vc\include\ ...

  4. error C2338: You've instantiated std::aligned_storage<Len, Align> with an extended alignment (in other words, Align >

    报的完整错误为: error C2338: You've instantiated std::aligned_storage<Len, Align> with an extended al ...

  5. atlcomcli.h(1756): error C2338: CVarTypeInfo< char > cannot be compiled with /J or _CHAR_UNSIGNED fl

    我拿到一个VS的工程,用VS2010 编译 时提示: atlcomcli.h(1756): error C2338: CVarTypeInfo< char > cannot be comp ...

  6. 旧文备份:windows下编译和使用IT++

    1.下载IT++最新版:<a href="http://sourceforge.net/projects/itpp/">http://sourceforge.net/p ...

  7. main.obj:-1: error: LNK2001: 无法解析的外部符号 "public: virtual struct QMetaObject const * __thiscall CustomButton::metaObject(void)const " (?metaObject@CustomButton@@UBEPBUQMetaObject@@XZ)

    QTCreator 运行时报错 main.obj:-1: error: LNK2001: 无法解析的外部符号 "public: virtual struct QMetaObject cons ...

  8. (原创)vagrant up 异常报错,出现 There was an error while executing `VBoxManage` 的解决方法

    最近在使用 vagrant homestead 时,不小心在虚拟机上使用了 exit 命令退出虚拟机,导致再使用 vagrant up 时出现以下错误: Bringing machine 'larav ...

  9. c++ - fcgio.cpp:50: error: 'EOF' was not declared in this scope - Stack Overflow

    c++ - fcgio.cpp:50: error: 'EOF' was not declared in this scope - Stack Overflow fcgio.cpp:50: error ...

随机推荐

  1. CTPN-自然文本场景检测代码阅读笔记

    TensorFlow代码 https://github.com/eragonruan/text-detection-ctpn 训练 main/train.py 1. utils/prepare/spl ...

  2. WIN10升级后输入法无法输入中文

    查看是否安装了中文输入法,可能在升级后用户文件出现问题. 在设置>语言.添加一下中文输入法.

  3. python列表(数组)

    列表(list)  就是 数组 - 列表是Python中的一个对象 - 对象(object)就是内存中专门用来存储数据的一块区域 - 之前我们学习的对象,像数值,它只能保存一个单一的数据 - 列表中可 ...

  4. acmPush模块示例demo

    感谢论坛版主 马浩川 的分享. 模块介绍:  阿里移动推送(Alibaba Cloud Mobile Push)是基于大数据的移动智能推送服务,帮助App快速集成移动推送的功能,在实现高效.精确.实时 ...

  5. 【LC_Lesson2】---整数反转练习

    题目描述: 给出一个 32 位的有符号整数,你需要将这个整数中每位上的数字进行反转. 示例 1: 输入: 123 输出: 321 示例 2: 输入: -123 输出: -321 示例 3: 输入: 1 ...

  6. RSA 的加密 解密

    RSA加密解密类: package me.hao0.trace.order; import java.io.BufferedReader; import java.io.BufferedWriter; ...

  7. 聊聊HTTP请求那一些事_HttpWebRequest_一篇就够了

    ​最近工作比较忙,很久没有写东西了,今天抽点时间整体一下最近工作的一个知识点小结.http请求对我们来说一点都不模式,程序员的我们有可能天天就是和这一些打交道.无论是BS架构的程序,前后端的数据交互, ...

  8. UidGenerator springboot2集成篇

    uid-generator 官网集成文档: https://github.com/baidu/uid-generator/blob/master/README.zh_cn.md 由于并没有提供spri ...

  9. Python入门小建议

    "java从心"正式更名"KEN DO EVERTHING".Ken(Can) Do Everything,无所不能 Believe youseft then ...

  10. HUAWEI MateBook Fn 功能键/热键切换、设置方法

    原文地址:https://club.huawei.com/thread-13130964-1-1.html HUAWE MateBook E/X/D的F1.F2 等键默认是热键优先.在热键模式下,要想 ...