PDA

View Full Version : menu actions calling a single slot



jayw710
28th June 2007, 01:56
Hi,

I have a menu with actions 1 through 10. When activated, I want each one to call the same slot, but with a parameter of its item number in the menu.

This was easy in qt3 with connectItem, but I can't see how to do this in Qt4.

Any suggestions?

Thanks!

Jay

jpn
28th June 2007, 06:52
QActionGroup or QSignalMapper does the trick.

jayw710
28th June 2007, 19:19
QActionGroup or QSignalMapper does the trick.

Yes, QSignalMapper did the trick, thanks!
Jay