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

Allow setting animation to paused state even if it is not running

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.0
    • Quick: Other
    • None
    • All

    Description

      You often want to stop animation without restarting it fully, which can be accomplished with paused property.

      Unfortunately following code will lead to

      NumberAnimation {
          running: program.state
          paused: Qt.application.active
      }
      

      following unhelpful warnings

       

      QML NumberAnimation: setPaused() cannot be used when animation isn't running

      , forcing the developer to write boilerplate

      NumberAnimation {
          running: program.state
          paused: running && Qt.application.active
      }
      

      While conceptually understandable not sure what is the value of coupling running and paused states so tightly together.

       

       

      s

       

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            jpetrell Joona Petrell
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes