书中有一段 说显示扩展对话框的实现,是:在单击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>>>");
        }
}
 
点击按钮后,为何没有反应?????