How to use nested if else block in QML
-
Hi,
i am writing a javascript function in QML. In this function i want to use nested if else block as
@if(statusText.text === "Active")
{
contextMenuModel.clear()
contextMenuModel.append({"menuItem":"Block"})
}
if(statusText.text === "Terminated")
{
contextMenuModel.clear()
contextMenuModel.append({"menuItem":"Allow"})
}
if(statusText.text === "Pending")
{
contextMenuModel.clear()
contextMenuModel.append({"menuItem":"Allow"})
contextMenuModel.append({"menuItem":"Block"})
}@when i am displaying this model, using list view... in last codition it display only "Allow"..