Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-8773

QML element growing out of/into e.g. list item needs better support and example code

    XMLWordPrintable

Details

    Description

      A use-case that keep coming up is that of a full-screen item growing/morphing out of
      the location of some icon Image, or similar non-full-screen item like a list view item.

      Currently it is near impossible to achieve the perfect behavior in QML. Still this is a
      common enough use case that there ought to be example code for it, and perhaps
      even some supporting additions to QML.

      Main issues include:

      1) It seems you can only change parent of an element as part of a state. This means
      the view (for example) that is to open and close from the icon (for example) needs to
      already be a child of the icon before the transition starts (because in the state change
      where the view become visible it change parent to e.g. the root element). This is not
      always easy to do, say for example if there is one "detail view" instance that should
      grow out of any of a number of items in a list, depending on which item the use tap
      (or if the view is to open out of one item and close into another).

      2) The only way to make an element grow and shrink is by using the Item.scale
      property. This means that if the view is to grow from the size and position of the icon
      (rather than from the upper left corner of the icon and a zero size) then the implementation
      become non-trivial.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            bodson Yann Bodson (Inactive)
            mathiasm Mathias Malmqvist
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes