QObject::connect: Parentheses expected, signal QAction::triggered in ..

提示信息:
QObject::connect: Parentheses expected, signal QAction::triggered in ..
QObject::connect: (receiver name: 'MainWindow')
且槽函数未执行。
原因:信号语句中少了括号(猪心大姨),应该写成

 connect(openAct,SIGNAL(triggered()),this,SLOT(open()));
 connect(newAct,SIGNAL(triggered()),this,SLOT(newEvent()));
posted @ 2022-08-19 09:18  Ada_CN  阅读(728)  评论(0编辑  收藏  举报