一、添加头文件 #include <QButtonGroup> #include <QCheckBox> 二、实例化一个按钮组 QButtonGroup *CheckbuttonGroup = new QButtonGroup(this); 三、添加到按钮组中 Checkbutt