An instance of WRadioButton corresponds to an HTML <input type="radio"> element.
By default, radio buttons are inline. You will need to use setInline(false) to let them stack vertically.
Usually, you'll group a set of radio buttons together in a WButtonGroup, so that only one can be selected at a time.
Since by default, radio buttons are inline, you will need to use setInline(false) to let them stack vertically.
You can process a new selection with a signal/slot mechanism. In the example below the signal checkedChanged() of the WButtonGroup is passed to an inner function passing a WPushButton. You can see that there are two ways to get the id assigned to a button, namely group->id(selection) and group->checkedId().