在父类中,我在构造函数中有一个插槽设置:
Class DummyParent
{
protected:
QWebPage page;
public slots:
DummyParent()
{
connect (&page , SIGNAL(...) , SLOT(replyFinir(bool));
}
void replyFinir (bool ok)
{
// handle reply messages
}
};
现在我有另一个派生自 DummyParent 的类:
class DummyChild
{
public slots:
void replyFinir (bool ok)
{
}
}
现在我遇到了问题,因为在 DummyParent 的构造函数中设置了插槽连接,所以它连接到旧处理程序,而不是当前处理程序。
我怎样才能让 DummyChild::page 调用它自己的 replyFinir(bool) 函数?