subclassing QGroupBox so that it can be member of QButtonGroup
问题 QButtonGroups can have checkboxes. But you cannot add them to a QButtonGroup because they do not inherit QAbstractButton. It would be really nice for some UIs to be able to have a few QGroupBoxes with exclusive checkboxes. That is, you check one and the other QGroupBoxes are automatically unchecked. In an ideal world, I could do something like this: import sys from PyQt5.QtCore import Qt from PyQt5.QtWidgets import (QGroupBox, QWidget, QApplication, QAbstractButton, QButtonGroup) class