Object::connect: Parentheses expected, signal QAction::activated
Object::connect: (receiver name: 'MainWindow')
这是提示你,语句中少了括号啊!
像这样:
connect(print,SIGNAL(activated),this,SLOT(print()));
其实应该被写成:
connect(print,SIGNAL(activated()),this,SLOT(print()));