如果你看过moc出来的*。cpp文件就能发现,如楼上所说,这些宏翻译成一种字符串了。另外得提醒你
如果你的SIGNAL是有参数的,在定义和连接的地方都不能带参数,只能含有参数类型指示。比如:
connect(this->button, SIGNAL(selected(const QItemIndex&)),this, SLOT(onSelected(const QItemIndex&)));
是正确的,而
connect(this->button, SIGNAL(selected(const QItemIndex& index)),this, SLOT(onSelected(const QItemIndex& index)));
是错误的。