[Interest] SLOT is not triggered by SIGNAL (trying to tee SIGNALS)

Tamás Nagy tamas.nagy.001 at gmail.com
Thu Oct 23 23:51:20 CEST 2014


Hi,

MyWorker A;
OtherWorker B;
A.connect(&B, SIGNAL(mysignal(MyList)), SLOT(mygetsignal())); //
mygetsignal gets called

QThread AThread;
QThread BThread;
A.moveToThread(&AThread);
B.moveToThread(&BThread);

A.connect(AThread, SIGNAL(started()), SLOT(mygetsignal()));

// what does not work:
A.connect(&B, SIGNAL(mysignal(MyList)), SLOT(myspecialslot(MyList)));
// myspecialslot is not called.

So I would like to tee (Y) the mysignal of my B worker to trigger 2
slots at once.

mygetsignal() gets input from user, and we cannot give the MyList as
dummy parameter,
because started() triggers it, and it cannot trigger a slot with parameters.

myspecialslot(MyList) prints special output.

The best would be if mygetsignal would do it, but it cannot have a
parameter, see before.

Tamas



More information about the Interest mailing list