Reputation: 3251
I have six checkable push buttons in QT, and I want it so that only one of the buttons are checked at one time (like radio buttons). I could probably do it with lots of signals and slots, but is there a easier way to do this?
I'm looking for something similar to how the QGroupBox and QRadioButtons work together.
Thanks
Upvotes: 1
Views: 211
Reputation: 17036
I think you're looking for http://doc.trolltech.com/4.7/qbuttongroup.html .
Make sure all of your buttons are checkable, make the group exclusive, use addButton() for each button and run with it.
Upvotes: 2