Qt6 topics merged with General

Adding button to Two QButtonGroup

  • I have a situation where I need 2 set of buttons,. I need to retrieve the first set of buttons when i want so I am adding to first QButtonGroup and similary the second set too,. now These buttons groups can be extended to n button group.
    I also need to find the pointer of a particular button from all the groups so can I still add all the buttons to a common QButtonGroup when its created and use that group to search throught he button. is it ok if I add a button to two QButtonGroups?

  • A button can only belong to a single button group. Other than that, I really don't get your explanation on what you are trying to do, so please rephrase.

  • ok Considering this way, I have n number of button groups I need to search for a button id from the button groups but I have attached those n button groups to a widget and did addwidget to a stacked widget,. Now i dont have ownership on those widgets, but still i want to get the button* of a particular id How would i achieve it?

  • instead of being so cryptic
    All I am trying to do is I have two buttons and I am trying to attach a tab order from one button to the stacked widget and from that to another button,. and in my case stacked widget can contain set of button,..
    settaborder(leftbutton, stackedwidget)
    settaborder(stackedwidget, rightbutton)
    is not working for me,.. I tried to setfocuspolicy before doing this to tabfocus,but still of no use

Log in to reply