Hi all!
I have a class for the main window, class A and class B, which inherits from class A:
MainWindow::MainWindow(){
...
A a;
connect(&a, SIGNAL(remoteSignal(bool)), this, SLOT(updateStates(bool)));
a.start();
B b;
connect(&b, SIGNAL(remoteSignal(bool)), this, SLOT(updateStates(bool)));
}
A::A()
{
}
void A::start(){
emit remoteSignal(true)
}
B::B()
{
A::start();
}
MainWindow::MainWindow(){
...
A a;
connect(&a, SIGNAL(remoteSignal(bool)), this, SLOT(updateStates(bool)));
a.start();
B b;
connect(&b, SIGNAL(remoteSignal(bool)), this, SLOT(updateStates(bool)));
}
A::A()
{
}
void A::start(){
emit remoteSignal(true)
}
B::B()
{
A::start();
}
To copy to clipboard, switch view to plain text mode
If I call the start method from object b for the parent class, there will not be any connections configured. How can I customize them?
Thanks!
Bookmarks