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

Constantin Makshin cmakshin at gmail.com
Wed Jul 14 20:07:02 CEST 2010


I said it looked weird because I don't see any reason to create connections that "throw away" arguments when there's a perfectly matching version.

On Wednesday 14 July 2010 21:45:32 Murphy, Sean M. wrote:
> > 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