Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. display loading while for loop is working in qml
Forum Updated to NodeBB v4.3 + New Features

display loading while for loop is working in qml

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 376 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    qAminzzz
    wrote on last edited by
    #1

    hi this is my code and i want to display a busyindicator
    but it doesn't work

     onClicked:
    {       
    myBusyIndicator.running= true         
          my for loop here // may take about 5 seconds
          {
          }
    
    myBusyIndicator.running= false
    }
    

    can i use Loader?
    how?

    thanks in advance
    (●'◡'●)

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      You probably need to give the event loop some time. Run your loop via a signal or via Qt.callLater(). This will give the even loop a chance to update QML before the loop starts.

      (Z(:^

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved