[Development] Rendering only items that are visible in Qt Quick
Paolo Angelelli
paolo.angelelli at qt.io
Fri Mar 23 15:03:14 CET 2018
Could one way be to change QList<QQuickItem *> QQuickItemPrivate::paintOrderChildItems() const; into a virtual method,
and reimplement it like in flickables or the like to prevent returning what isn't currently visible?
That was at least my idea when i was looking at how to do this on maps (where there are potentially plenty of items,
but also potentially only few are visible).
Could this work? or what cases would this break?
On Fri, 23 Mar 2018 13:44:03 +0000
Mitch Curtis <mitch.curtis at qt.io> wrote:
> I'd like to get some discussion going around this:
>
> https://bugreports.qt.io/browse/QTBUG-67274
>
> As I understand it, clipping (the "clip" property) doesn't prevent items that aren't visible (in the sense of being out of the viewport, not the "visible" property) from actually being rendered.
>
> It would be useful if we had a way to do this with minimal effort from the user. I'm thinking of a e.g. a property or flag in QQuickItem that, when set, would cause the scenegraph to use the shape (could start off as just being a bounding rect) of child items to determine whether or not that item is visible with regards to its parents bounding rect. That way, any regular old item can benefit from it easily.
>
> Does anyone else have ideas about this?
>
> Comments about how it will never work and I should feel bad for suggesting it?
>
> Far superior alternatives?
>
> Please, share your thoughts! :D
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
More information about the Development
mailing list