QObject::connect: Parentheses expected,

参考博客:https://blog.csdn.net/lxj362343/article/details/106998445

在类中使用信号/槽时一定要加Q_OBJECT宏,signal和slots的参数要一样

槽函数加(): connect(toTopLayerAction, SIGNAL(triggered()), this, SLOT(slotLayerTop()));   // 正确

切记忘了():connect(toTopLayerAction, SIGNAL(triggered()), this, SLOT(slotLayerTop));      // 错误
文章目录