Proper usage of ContextMenu in a delegated SilicaListView

Hi folks,

I have a SilicaListview where I use a delegate item:

This is the delegate code:

The delegate itself displayed fine, however the menu appears weirdly in front of my delegate:
kép

What is the best way to move the context menu below my item?
Many thanks in advance!

A similar question will probably answer your question …

2 Likes

That’s most likely because you have fixed the height of your ListItem

1 Like

Yes it was. I set it because if I do not specify it my items got overlapping:
kép

Do you happen to have any suggestions how to overcome this?

I think you can set contentHeight to get taller delegates.
I use contentItem.height, but the former is a nicer alias for it.

Ah man you saved the day:
kép

1 Like

@martyone I was wondering about if the qmllint which checks the QML files in the Sailfish IDE could catch such an issues. Does the Sailfish SDK using a fork or an upstream qmllint?

AFAIK neither Sailfish IDE nor the upstream Qt Creator makes any use of qmllint. Sailfish IDE does not differ from the upstream Qt Creator in the static QML code checker. Anyway, to me the issue discussed here does not seem to be generic enough to be suitable for any of these.

AFAIK neither Sailfish IDE nor the upstream Qt Creator makes any use of qmllint.

Upps, I was not aware of that the static QML checking is built into the QtCreator and not run externally by the qmllint.