I have six checkable push buttons in QT, and I want开发者_如何学Python 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
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.
精彩评论