ashe0817:这个是Qt提供的一个功能。连接信号槽需要显示调用connnect去把一个信号和槽关联起来
但是有个例外的情况,就是这里的on_xxx_yyy规则
xxx表示对象的名称,yyy表示该对象的某个信号的名称,比如“on_pushButton_clicked”、on_pushButton2_clicked
那么Qt又是怎么连接的呢?你在编 ..
 (2013-12-28 22:02) 
 
书中有一段 说显示扩展对话框的实现,是:在单击more按钮时调用QPushButton中的setText()函数完成。 
我写了:
        QObject::connect(moreButton, SIGNAL(clicked()), this, SLOT(isClicked())); 
        QObject::connect(moreButton, SIGNAL(toggled(bool)), SecondaryGroupBox, SLOT(setVisible(bool)));
        QObject::connect(moreButton, SIGNAL(toggled(bool)), tertiaryGroupBox, SLOT(setVisible(bool))); 
…… 
void CSortDialog::isClicked()
{
        if (moreButton->text() == "&More>>>")
        {
                moreButton->setText("&More<<<");
        }
        else
        {
                moreButton->setText("&More>>>");
        }
} 
点击按钮后,为何没有反应?????