Can I make an item be rendered when an ancestor of it has opacity 0?



  • Problem statement

    Can I make an item be rendered when an ancestor of it has opacity 0?


    Motivation

    The motivation for this question is this other question of mine (I'll call it the "hidden-texture-source" problem). Note that currently I'm using opacity: 0 rather than visible: false, but this causes the same problem as in the linked question.

    The reason I'm hiding items is this.

    At one point, I was only culling directly each item that needs to be used as a texture source. So the fix for the hidden-texture-source problem was simple: (simplified pseudocode)

    texSourceItem.opacity = 1;
    cppItem.update(); // QQuickFramebufferObject
    texSourceItem.opacity = 0; // reset back to 0
    

    But now I'm also culling entire Rows of such items. And since opacity is inherited, if I want to update the cppItem, I have to do the unhide-hide dance for the entire parent Row. Then, two texture-source items may happen do the unhide-hide procedure with interlocked timing, so to avoid bugs, I have to keep a custom reference counter that knows how many cppItems are currently being updated. This is too complicated a solution for my liking. So an answer to my question would be beneficial.