Below is code snippet I have written in main.qml file.
Basically I have a MessageDialog. Here, when disableOkBtn boolean is true, then I want to set standard ok button to disabled state
****************
MessageDialog {
id: mainDialog
..
..
}

/// Java Script

function showMessageBox(bool disableOkBtn) {
if(disableOkBtn) {
mainDialog.standardButtons = StandardButton.Ok | StandardButton.Cancel;
mainDialog.standardButtons(StandardButton.Ok).enab led = false; //this line does not work , Basically here I want to set standard ok button to disabled state
}
}
************************
Please guide me what should be the correct way instead of below line.
mainDialog.standardButtons(StandardButton.Ok).enab led = false;

Above line of code doesn't work