QComboBox *editor = new QComboBox(this);
comboBox->addItems(QStringList()<<tr("Always")<<tr("Never")<<tr("Motion detection")<<tr("Timer recording"));
QVariant v(0);
// 序号为2的选项(第三个)不可选
comboBox->setItemData(2, v, Qt::UserRole - 1);
// 选项背景置灰
comboBox->setItemData(2, Qt::lightGray, Qt::BackgroundColorRole);
return editor;