Grid View : draw outside of delagate limits
Hi every one, I have some items displayed in a
GridView. In those items, I have a text that might be long so I'm using the elide option on it. The thing is I would like to have a tooltip that popup with the full text.
I managed to do almost everything (tooltip works fine and pop up with the text, ...) except for one thing : when the tooltip is too wide (which is often the case because I'm using it to display long text), a part of it is displayed under the cell on the right.
That totally makes sens as everything inside the cell N is drawn before the cell N+1 so it's z-index is lower but I would like to know if there is a way to force a specific QML element to be drawn above every other (or at least above my whole
ps : I prefer not to use
z-indexto do so as I have absolutely no idea how many elements I may have in the
GridViewso I would like to avoid setting it to 1000 for example and then having some issues when you have more than 1000 layers drawn. But if you have an idea using
z-indexthat doesn't have this problem, I'm totally fine with it.
The solution would be to have an element that is above all delegates, and preferably above everything else.
Something that would work is an
Itemparented to the
contentItemwith a high
zvalue that you can display on demand and position on your delegate.
Hopefully there are existing components that do that : QQC2
Popupdoes the first part, and the rest is done by QQC2
Ok thx, i've also found a very detailed solution on stackoverflow on how to use a parent above evrything to display a component on top.
I didn't know about the
ToolTipcomponent. i might endup using it since it has the same purpose as what I did but probably more efficient and more weird-case-proof. So thank you for your answser.