Я хочу, чтобы itemSwitch2 был недоступен для выбора, если itemSwitch1 установлен в положение «ON». Как отключить доступ к itemSwitch2
function setSelectable(item, state)
{
item.editable = state
}
StyledComboBox {
id: itemSwitch1
Layout.row: 0
Layout.column: 1
model: ["ON", "OFF"]
currentIndex: (root.systemInfo.itemEn) ? 0 : 1
onUpDownPressed:
{
currentIndex = !currentIndex;
}
onEditFinished: {
dashboard.setSelectibale(itemSwitch2, false)
optionProvider.upDate(currentIndexItem.text)
itemLabel1.focus = true;
updateTimer.running = true;
}
}