Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. window.requestAnimationFrame equivalent?
Qt 6.12 LTS is out! See what's new in the release blog

window.requestAnimationFrame equivalent?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 1 Posters 1.0k Views 1 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.
  • CKurduC Offline
    CKurduC Offline
    CKurdu
    wrote on last edited by CKurdu
    #1

    Hi everybody,
    I am trying to implement this animation into my application.
    I need window.requestAnimationFrame equivalent. I found that requestAnimationFrame in Canvas item.
    It behaves different because it creates "RangeError: Maximum call stack size exceeded."
    I think it immediately creates a paint request.
    I also tried markDirty and paintRequest methods on paint event but they do not create continues requests.

    How can I do it without create a timer?

    You reap what you sow it

    1 Reply Last reply
    0
    • CKurduC Offline
      CKurduC Offline
      CKurdu
      wrote on last edited by
      #2

      I think I solved the problem by myself.

      canvas.b.requestAnimationFrame(canvas.b.requestPaint);
      

      Full example is here.

      You reap what you sow it

      1 Reply Last reply
      1

      • Login

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