When I try to connect a BASE class signal, Qt tells me the signal does not exists on the DERIVED class.
Why is that? How can I tell connect to use the BASE class?
namespace MyNamespace
{
void register(Derived* derived)
{
// ERROR MSG
// QObject::connect: No such signal MyNamespace::Derived::baseSignal()
QObject::connect( derived, SIGNAL(baseSignal()),
foo, SLOT(fooSlot()));
}
class Base : public QObject
{
Q_OBJECT
signals:
void baseSignal();
};
class Derived : public QObject,
public Base
{
Q_OBJECT
signals:
void derivedSignal();
};
} // namespace MyNamespace