监控页面所有checkbox改变状态的简单方法

QList<QCheckBox *> widgets = findChildren<QCheckBox *>();
foreach(QCheckBox* checkbox, widgets)
{
     connect(checkbox, SIGNAL(stateChanged(int)), this, SLOT(slotEnableSaveButton()));
}

原文地址:https://www.cnblogs.com/cute/p/2097273.html