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

Effects are implcit components which has serious consequences on usabilty

    XMLWordPrintable

Details

    • User Story
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • None

    Description

      Effects are implcit components which has serious consequences on usabilty.

      Effects assignes as layer.effect are implcit components. This means that the effect has its own context and the id and property of the effect are not accessible from the outside.

      Item {
         layer.effect: FastBlur { id: fastBlur }
      }
      

      In this case fastBlur and its properties are not accessible from the root context if the QML file.
      This means the properties of the effect cannot be changed by states and animated by a timeline.

      This is confusing even for advanced users and has serious implications for tooling.
      To work around this always another "helper property" has to be created.

      Item {
         id: item
         property int helperRadius: 10
         layer.effect: FastBlur { 
            id: fastBlur 
            radius: item.helperRadius
            }
      }
      

      This is very counter intuitve and requires extra work from any user.
      There is also no real elegant workaround in the tooling. The tooling would have to "magically" generate and maintain the "helper property", which would easily break.

      See also: https://bugreports.qt.io/browse/QDS-4388

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.graphics.and.multimedia Qt Graphics Team
              thohartm Thomas Hartmann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes