How to use q-btn in q-tooltip
-
Hi everyone., I want to put a delete button on an image when make mouse over it. I just thought a solution by using tooltip but button doesn’t work in tooltip… Can you help… Here are my codes…
<q-img :src="existingImage.url"> <q-tooltip anchor="top right" :offset="[-20,-5]" transition-show="scale" transition-hide="scale" content-class="transparent"> <q-btn tabIndex="100" round color="red" icon="delete" size="sm" @click="dltImage()" /> </q-tooltip> </q-img>
-
QTooltip isn’t made for that. Use QMenu or QPopupProxy instead.
Scott
-
Thanks for your answer… They are triggered by clicking… Actually I want to make a hover button on an image component…
-
You can trigger the menu via the mouseover event. The timing isn’t 100% correct in the example below, but I think you can get the idea.
https://codepen.io/smolinari/pen/dyoJddx?editors=1010
Scott
-
@s-molinari Thank you.