Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › ActivityIndicatorBarItem doesn't animiate

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #20749

    Felgo User

    Is ActivityIndicatorBarItem supposed to animate if the “animating” property is set to true?  I would like to have a spinning animation in the navigation bar, however it does not initially spin when animating is set to true.   The showcase example (ExamplePage.xml) uses this control and it also does not initially spin, only if when the IconButtonBarItem is toggled.  Even then, it only spins for a few seconds.  Is this intended?  Is there a way I can get it spin indefinitely?

    #20750

    Alex
    Felgo Team

    Hi,

    the ActivityIndicatorBarItem as well as the AppActivityIndicator will be fixed with the next update. Until then, you can use this workaround:

    import Felgo 3.0
    import QtQuick 2.9
    
    App {
      NavigationStack {
        Page {
          title: "Activity Indicator"
          rightBarItem: ActivityIndicatorBarItem {
            Component.onCompleted: {
              var internalAnimation = data[0].data[0].data[0]
              // stop the internal animation to set the loops to infinite
              internalAnimation.stop()
              internalAnimation.loops = Animation.Infinite
              // from this point on the component works as desired
              // in case it should be running at the moment, we start the animation
              if(animating) internalAnimation.start()
            }
          }
    
          // same can be done for the AppActivityIndicator
          AppActivityIndicator {
            Component.onCompleted: {
              // different selector for the internal animation
              var internalAnimation = data[0].data[0]
              internalAnimation.stop()
              internalAnimation.loops = Animation.Infinite
              if(animating) internalAnimation.start()
            }
          }
        }
      }
    }
    

    Cheers,
    Alex

    #20756

    Felgo User

    Excellent.  Thanks for the quick response.  Works great.

Viewing 3 posts - 1 through 3 (of 3 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded