[Qt-interest] Binding a value to a slot

Reece Dunn msclrhd at googlemail.com
Fri May 21 01:11:51 CEST 2010


On 20 May 2010 15:44, Tony Rietwyk <tony.rietwyk at rightsoft.com.au> wrote:
> Have a look at QActionGroup.triggered, and just
> setProperty("MY_ALIGN_VALUE", Qt::AlignXXX ) on each.
>
> Strangely, QButtonGroup has a better api, since it supports the extra int
> when you add the buttons.
>
> Alternatively, you use the more general QSignalMapper.

I have ended up doing setData() and data() calls on the QAction,
getting the action via the sender() method, like the MRU example does.

Thanks for the pointers,
- Reece



More information about the Qt-interest-old mailing list