[Qt-interest] QActions don't appear in QMenu

Murphy, Sean M. sean.murphy at gd-ais.com
Wed Jul 14 19:45:32 CEST 2010


> By the way, your connect() call looks a bit weird, too — the signal 
> has a parameter, but the slot does not.
> 

His connect statement doesn't look weird at all, see http://doc.trolltech.com/4.6/signalsandslots.html#signals-and-slots-with-default-arguments, specifically the line "the signature passed to the SIGNAL() macro must not have fewer arguments than the signature passed to the SLOT() macro" and the second connect() example they show.

You can connect a SIGNAL that has an argument to a SLOT which takes no arguments, but not vice versa.

Sean




More information about the Qt-interest-old mailing list