这样不行
connect(copyAction, SIGNAL(QAction::triggered(bool)), this, SLOT(CopyMessage()));
这样可以
connect(copyAction, SIGNAL(triggered(bool)), this, SLOT(CopyMessage()));
想写类名可以用这种方式,注意 slot 前面的 & 不要遗漏。
connect(copyAction, &QAction::triggered, this, &this_gui_class::CopyMessage);