[Qt-interest] customised signals and slots in qt
Nikos Chantziaras
realnc at arcor.de
Fri Jul 8 09:52:49 CEST 2011
On 07/08/2011 05:10 AM, Bill Crocker wrote:
>
>>>
>>> Connect(object_a, SIGNAL( signal1()),object_b, SLOT(slot1()));
>>
>> That should be:
>>
>> connect(object_a, SIGNAL(signal1()), object_b, SLOT(slot1()));
>>
>
> No, that should be:
>
> if( !connect(object_a, SIGNAL(signal1()), object_b, SLOT(slot1())) )
> Q_ASSERT(false);
That's not necessary. When a connect fails, an error message is printed
on stderr anyway.
More information about the Qt-interest-old
mailing list