I can easily use the element using InvokeActionItem on the page, but I need to be able to call it on the listview element. I managed to make a call, but I canβt figure out how to add data when it starts. I keep getting error message
InvocationPrivate :: setQuery: you are not allowed to modify the InvokeQuery object
Note. I am trying to do this in pure QML, I will do it with C ++ if necessary, but QML would be preferable.
Code that works inside the Page object:
actions: [ InvokeActionItem { ActionBar.placement: ActionBarPlacement.OnBar title: "Share" query { mimeType: "text/plain" invokeActionId: "bb.action.SHARE" } onTriggered: {
The code I tried to use on another element looks like this, but DOES NOT work:
Container { gestureHandlers: [ TapHandler { LongPressHandler { onLongPressed: { console.log("Longpress"); invokeQuery.setData("test"); invokeShare.trigger("bb.action.SHARE"); } } ] attachedObjects: [ Invocation { id: invokeShare query: InvokeQuery { id:invokeQuery mimeType: "text/plain" } } ] }
Is there a way to change the data to be called only with QML, or do I just need to run it using C ++?
source share