qt的connect(timer,SIGNAL(timeout()),SLOT(sendData()));

修行者-121 2013-06-17 12:54:01
球解
connect(timer,SIGNAL(timeout()),SLOT(sendData()));
这个函数里面为什么没有receive只有槽函数
谢谢
...全文
1096 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
dbzhang800 2013-06-17
  • 打赏
  • 举报
回复
引用 8 楼 cdx2134803 的回复:
怎么不说话, connect(timer,SIGNAL(timeout()),SLOT(sendData())); connect(updatetimer,SIGNAL(timeout()),this,SLOT(updatetime())); 有的有receiver有的有没有?搞不懂
对此,Manual中说的很清楚 题外:你翻开connect的manual时,不要只盯着多个connect重载中的一个
修行者-121 2013-06-17
  • 打赏
  • 举报
回复
怎么不说话, connect(timer,SIGNAL(timeout()),SLOT(sendData())); connect(updatetimer,SIGNAL(timeout()),this,SLOT(updatetime())); 有的有receiver有的有没有?搞不懂
dbzhang800 2013-06-17
  • 打赏
  • 举报
回复
引用 4 楼 cdx2134803 的回复:
bool QObject::connect ( const QObject * sender, const char * signal, const QObject * receiver, const char * method, Qt::ConnectionType type = Qt::AutoConnection ) [static] 这就是手册里面的解释
建议回去重看一遍
修行者-121 2013-06-17
  • 打赏
  • 举报
回复
你可以肯定吗?
一如当初 2013-06-17
  • 打赏
  • 举报
回复
不写的话默认就是this
修行者-121 2013-06-17
  • 打赏
  • 举报
回复
bool QObject::connect ( const QObject * sender, const char * signal, const QObject * receiver, const char * method, Qt::ConnectionType type = Qt::AutoConnection ) [static] 这就是手册里面的解释
修行者-121 2013-06-17
  • 打赏
  • 举报
回复
还是不明白!
dbzhang800 2013-06-17
  • 打赏
  • 举报
回复
引用 楼主 cdx2134803 的回复:
球解 connect(timer,SIGNAL(timeout()),SLOT(sendData())); 这个函数里面为什么没有receive只有槽函数 谢谢
不妨先去简单瞄一眼 QObject::connect() 的 manual
zhxianbin 2013-06-17
  • 打赏
  • 举报
回复
引用 楼主 cdx2134803 的回复:
球解 connect(timer,SIGNAL(timeout()),SLOT(sendData())); 这个函数里面为什么没有receive只有槽函数 谢谢
哪里来的代码????

16,215

社区成员

发帖
与我相关
我的任务
社区描述
Qt 是一个跨平台应用程序框架。通过使用 Qt,您可以一次性开发应用程序和用户界面,然后将其部署到多个桌面和嵌入式操作系统,而无需重复编写源代码。
社区管理员
  • Qt
  • 亭台六七座
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧