0

I'm trying to use the ActionSelectionPopover located here, I can't find any examples on how to actually execute/show it, from looking at the demo QML files this is what I have come up with:

/* Popup menu when right clicking items */
ActionSelectionPopover {
    id: contextMenu
    actions: ActionList {
        Action {
            text: i18n.tr("View Item Info")
            onTriggered: print(text)
        }
    }
}

Then later I have this in an item:

onClicked: {
    contextMenu.caller = item;
    contextMenu.show();
    print(item);
}

Now the item is printed, but the ActionSelectionPopover does not show.

1 Answer 1

1

Well I figured out what was going on in my case, I was handling it correctly, what was happening is for some reason, probably because where my ActionSelectionPopover was located in my QML file, it was appearing below all the other components in my app, I just set it's z property to 100, and now it works fine, so this is my new ActionSelectionPopover code:

/* Popup menu when right clicking items */
ActionSelectionPopover {
    id: contextMenu
    z: 100
    actions: ActionList {
        Action {
            text: i18n.tr("View Item Info")
            onTriggered: print(text)
        }
    }
}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .