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

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

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: 6.0 (Next Major Release)
    • Fix Version/s: None
    • Component/s: Quick: Other
    • Labels:
      None
    • Platform/s:
      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

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

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes