OverviewFelgo 2 Support (Qt 5) › How to use AppActivityIndicator while downloading data from Internet

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



    I want to use Felgo AppActivityIndicator when my app downloads some data from Internet.

    When my app starts its get some json data from internet using  Component.onCompleted: { }. After user needs new data he7she can activate  AppActivityIndicator icon to get new data. While is geting new data I need to activate AppActivityIndicator  animation and when download completse I need to stop the AppActivityIndicator  animation

    How do I do that?  I couldn’t find any example for that. Any help please.


    Felgo Team


    the AppActivityIndicator has the methods startAnimating() and stopAnimating(). Depending on how you get your data, you can start the indicator when requesting your data and stop the indicator when you received your data?

    For an xmlhttprequest this could look something like this:

    function loadJsonData() {
         var xhr = new XMLHttpRequest
         xhr.onreadystatechange = function() {
           if (xhr.readyState === XMLHttpRequest.DONE) {
             var dataString = xhr.responseText
             app.jsonData = JSON.parse(dataString)
         }"GET", "your-url")




    Thanx Alex, I will update my code.

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

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
create apps
create games
cross platform
native performance
3rd party services
game network
level editor
easiest to learn
biggest time saving
best support