PDA

View Full Version : [SOLVED]"catch" a custom signal emited by a promoted widget inside the Ui



graciano
20th March 2010, 18:07
Hello.

I have class A and in the a.ui i insert a widget(Class W). User the promotion aproach here.
Both were created using a.h, x.cpp and x.ui.
I created mySignal(QString &) in w.h and then emit(mySignal("Hello") somewhere in the w.cpp.
Can i receive this SIGNAL at the base class A?

Thanks

Lykurg
20th March 2010, 18:14
Well your description is very confusing.... Did you search
A::A(){
connect(ui.w, SIGNAL(mySignal(QString &)), this, SLOT(mySlot(QString &)));
}

graciano
20th March 2010, 18:22
Well your description is very confusing....
I agree on this :)

But looking at your line of code i realised what i was doing wrong.

Thanks