Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt: Is it possible to connect a signal to a signal in Qt designer

I have been reading in the signals & slots documentation and it says that you can connect a signal to a signal and trigger the slot thats connected to the second signal in the chain. I cant find a way to do this in Qt designer, it only lets you connect a signal to a slot not a signal to a signal. Also i cant find it in the docs but if have a signal connected to a signal with the first signal carrying QString argument for example will the QString be propagated along the chain.

Thanks!

like image 865
jonathan topf Avatar asked Jun 07 '11 17:06

jonathan topf


2 Answers

You can't do this in Qt Designer; you have to do it in code. And yes, you can propagate the QString parameter.

like image 57
TonyK Avatar answered Sep 21 '22 03:09

TonyK


I don't think that's possible in the designer directly (it's not a very common thing to do). But you could do it in your custom code.

The parameters emitted with the original signal will be passed on the to slot after the relay.

like image 30
Mat Avatar answered Sep 24 '22 03:09

Mat