01-04-2013 08:01 AM
I want to create the functionality that if my app is purchased the action item will change from the InOverflow ot OnBar however the following code creates duplicte action items when it changes. Any suggestions how to work around this?
ActionItem {
title: qsTr("Options")
ActionBar.placement: _tiledApp.purchased != "Purchased" ? ActionBarPlacement.OnBar : ActionBarPlacement.InOverflow
onTriggered: {
if (_tiledApp.purchased == "Purchased") {
// if (purchased) {
var page = getOptionsPage();
console.debug("pushing detail " + page)
navPaneid.push(page);
} else {
optionsToast.show()
console.debug(purched);
}
}
attachedObjects: [
SystemToast {
id: optionsToast
body: "Premium version required"
}
]
},
Solved! Go to Solution.
01-04-2013 04:23 PM
I'll post this as bug - however leaving the actionitem in place and just changing the title, image and function is a workaround that works - just as long as you are swapping between onBar and inOverflow.