Connecting to ButtonGroup "pressed" signal

Godot Version

Godot 4.2.2

Question

I’m trying to set up a group of radio buttons, and it seems ButtonGroup is the way to do this. The documentation says ButtonGroup has a “pressed” signal that triggers when any of the buttons in the group are pressed, and receives a reference to the pressed button.

That sounds great; but where do I connect this signal to anything? The ButtonGroup in the editor isn’t something I can select and open the Node panel on, and editing the ButtonGroup itself gives me almost no options, just allow_unpress, so I can’t connect its signals to anything in the editor.

I’m not finding much info searching the internet for this, but some of what I’ve seen suggests that the ButtonGroup’s “pressed” signal maybe overrides the individual buttons’ “pressed” signals? That feels weird - if I want to connect something to the ButtonGroup’s “pressed”, do I connected it via the Node panel of one of the buttons? Or all the buttons? The Node panel still doesn’t show the “pressed” signal receiving a parameter, so I’m not convinced it’s the same thing.

So how do I connect a function to the ButtonGroup’s “pressed” signal?

I think you have to connect this in code