• 7996阅读
  • 2回复

【提问】warning: Object::connect: Use the SLOT or SIGNAL macro to connect [复制链接]

上一主题 下一主题
离线80437
 
只看楼主 倒序阅读 楼主  发表于: 2005-09-29
调用QMenu的如下方法:

QAction * QMenu::addAction ( const QString & text, const QObject * receiver, const char * member, const QKeySequence & shortcut = 0 )

debug时候出现这样的信息

warning: Object::connect: Use the SLOT or SIGNAL macro to connect

是什么原因?
表现结果是执行菜单的点击操作,没有出发预期要执行的函数,ie. receiver->member
[ 此贴被XChinux在2005-09-29 14:07重新编辑 ]
离线XChinux

只看该作者 1楼 发表于: 2005-09-29
Re:【提问】warning: Object::connect: Use the SLOT
信息不完整,源代码和配置呢?还有出错信息
二笔 openSUSE Vim N9 BB10 XChinux@163.com 网易博客 腾讯微博
承接C++/Qt、Qt UI界面、PHP及预算报销系统开发业务
离线running
只看该作者 2楼 发表于: 2005-10-11
Re:【提问】warning: Object::connect: Use the SLOT
是不是忘了加:
Q_OBJECT
快速回复
限100 字节
 
上一个 下一个