[Qt-interest] QRadioButton events handling best practice

Andre Somers andre at familiesomers.nl
Tue Nov 2 16:40:16 CET 2010


Op 2-11-2010 16:33, Alex Ivasyuv schreef:
> Hi,
>
> I have for example, 3 radio buttons. And on any click on it, I need to
> know which one was clicked.
> As I understand, I have to create 3 radiobutton objects, and connect
> them (3 items) with signal&  slot.
> Then handle it's clicking...
>
> What is the best practice to do it with Qt, maybe there are present
> already some mechanisms to do it, e.g.
> add radiobuttons to group and connect group on click, or smth like that...
>
> Thanks in advance,
>
Look into QButtonGroup and/or QSignalMapper.

André



More information about the Qt-interest-old mailing list