Where did you place those buttons? I mean what is their parent widget?
Where did you place those buttons? I mean what is their parent widget?
I just dropped three default QPushButtons on a generic QWidget parent in Designer, marked them all checkable, and the default behaviour is that they operate independently as you are asking for. The same is true for a default QGroupBox container. What container are you using?
You can access QButtonGroup in Designer but it is not immediately obvious. Select the push buttons you want in the group, right click for the context menu and select "Assign to button group...". The default behaviour of the group is to make the buttons exclusive, precisely the opposite of the default behaviour and your required behaviour.
Their parent was a vertical layout in the central widget of a mainWindow.
I figured out how to add them to a QButtonGroup and when I unchecked that group's exclusive property, I got what I want.
Thanks,
Dave Thomas
The layout does not own the widgets is controls layout for; they are owned by a QWidget. If you do not parent the widgets explicitly then their parent is set by the layout when you apply it to a container.
Bookmarks