码迷,mamicode.com
首页 > 系统相关 > 详细

error : Class declarations lacks Q_OBJECT macro

时间:2015-02-12 10:52:23      阅读:1133      评论:0      收藏:0      [点我收藏+]

标签:


直译是:类声明没有Q_OBJECT 宏。
class CError1 : public QObject
{

signals:
    void OnButClicked();        
};

class CError2 : public QObject
{
signals:
    void OnButClicked();        
};


class CError1 : public QObject
{
    Q_OBJECT
signals:
    void OnButClicked();        
};

类声明加上Q_OBJECT就好了。

class CError1 : public QObject
{
    Q_OBJECT
signals:
    void OnButClicked();        
};

class CError2 : public QObject
{
    Q_OBJECT
signals:
    void OnButClicked();        
};
class CError2 : public QObject
{
    Q_OBJECT
signals:
    void OnButClicked();        
};

error : Class declarations lacks Q_OBJECT macro

标签:

原文地址:http://blog.csdn.net/he_zhidan/article/details/43758689

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!