QAction中的triggered方法的使用!

weixin_38056418 2019-09-19 04:09:11
assistant中是这样定义的void QAction::triggered ( bool checked = false )  [signal]This signal is emitted when an action is activated by the user; for example, when the user clicks a menu option, toolbar button, or presses an action's shortcut key combination, or when trigger() was called. Notably, it is not emitted when setChecked() or toggle() is called.connect(qaction, SIGNAL(triggered()), this, SLOT(open()));可以使用,但是connect(qaction, SIGNAL(triggered(false)), this, SLOT(open()));就不行了,定义中的参数是默认参数false,为什么加false就不可以了呢?拜托了!
...全文
3197 11 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复

474

社区成员

发帖
与我相关
我的任务
社区描述
其他技术讨论专区
其他 技术论坛(原bbs)
社区管理员
  • 其他技术讨论专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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