Доброго времени суток всем!Сделал вот такой тест, по нажатию check'а должен меняться цвет фона у label:Код

ialog:

ialog(QWidget *parent) : QDialog(parent), ui(new Ui:

ialog){ ui->setupUi(this); ui->label->setProperty("alarm", false); QString css = QString("QLabel { border: 1px solid yellow;\n"); css += "background-color: gray;\n"; css += "color: yellow\n}\n"; css += "QLabel[alarm=\"true\"] { background-color: red }\n"; css += "QLabel[alarm=\"false\"] { background-color: gray }\n"; ui->label->setStyleSheet(css); bool al = ui->label->property("alarm").toBool(); qDebug("al=%d", al);}void Dialog:

n_checkBox_toggled(bool checked){ if (checked) { ui->label->setProperty("alarm", true); } else { ui->label->setProperty("alarm", false); } bool al = ui->label->property("alarm").toBool(); qDebug("al=%d", al);}а ничего не меняется. Что я делаю не так?