senseiwa
senseiwa

Reputation: 2499

Qt Connect signals with different arguments

I have a simple question guys, reading the thread about connecting signals with slots with fewer arguments, and of course, the Qt documentation.

However, I do not need to connect signals with slots. I actually want to connect signals with signals with fewer arguments.

The documentation is very clear about slots, but what about signals?

Is that considered safe?

Thanks & Cheers!

Upvotes: 2

Views: 1382

Answers (1)

Nejat
Nejat

Reputation: 32685

There is no difference. The receiving signal may have a shorter signature than the emitting signal. because it can ignore extra arguments. You can connect a signal like:

signal(int, int, int)

TO SIGNAL with the following signatures:

signal1(int, int, int)
signal2(int, int)
signal3(int)
signal4()

Upvotes: 6

Related Questions