[Interest] [Qml][Item][Node] Determine if Item is rendered

Jérôme Godbout jerome at bodycad.com
Wed Jun 8 15:50:12 CEST 2016


Thanks, this is what I though.

Since we are using reparenting to make the switch, I figured I could
recusirvely check if parent can climb back to the root item or not. This is
particulary unefficient but can be done a single time on parentChange (this
doesn't support dynamic hierarchie above parent) but work for my specific
case.

regards,
Jerome

On Wed, Jun 8, 2016 at 1:10 AM, Liang Jian <jianliang79 at gmail.com> wrote:

>     I have encountered nearly the same problem as yours. I have contact qt
> support and finnaly I realized that right now this is not possible.
>     The only workaround is to let the Qml item's user to tell you which
> part is visible and then your quick item change its nodes dynamically.
>
>
> On Wed, Jun 8, 2016 at 4:44 AM, Jérôme Godbout <jerome at bodycad.com> wrote:
>
>> Hi,
>> I looking for a way to know if an Qml Item is rendered, we are
>> reparenting some Item to display or not some Item Tree. Concret we swap
>> between parent null and by parent of the rendering scene container. This
>> allow to know only the part we are currently displaying, the others
>> parentless Item are unknown at this given time and may appears only later
>> on.
>>
>> I have something that do an action that is only required when the Item is
>> displayed, but I cannot based myself on the visible. I was wondering if
>> there's a way to know if an Item is rendered (was traversed during the
>> Rendering Node of last frame would be good enough).
>>
>> Anybody have an idea?
>> Thanks,
>> Jerome
>>
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160608/6a695324/attachment.html>


More information about the Interest mailing list