Actions
Improvements #14229
openUpdate WRadioButton -> attribute "value" must be left alone
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
12/30/2025
Due date:
% Done:
0%
Estimated time:
Description
I wanted to save a value on a radio button with setAttributeValue("value", <value>)
This had the side effect of killing the identification within the WButtonGroup:
radio->checked().connect([this, radio](){
int activeIndex = this->group_radio->id(radio); // <- This works
int testID = this->group_radio->checkedId(); // <- This fails (-1)
});
also checkedChanged() did not provide a pointer to the radio.
In this context I realized that the id and the name attributes are different.
but currently I do not understand why, and also why the value is used for the event identification ...
For now it should be enough to somehow document this behaviour.
At least it can be found by others now =)
No data to display
Actions