Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. How to disable Javascript timers throttling in Qt 5.12?
Forum Updated to NodeBB v4.3 + New Features

How to disable Javascript timers throttling in Qt 5.12?

Scheduled Pinned Locked Moved Unsolved QtWebEngine
1 Posts 1 Posters 464 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.
  • D Offline
    D Offline
    deleted312
    wrote on last edited by
    #1

    I am using a QWebEngineView to load a local html file in my Qt application. This html file contains some Javascript timers (setInterval and setTimeout). When I compiled my app with Qt 5.11.2, I could set the timers to have a short interval smaller than 1s, for example 200ms.

    When I compile the app with Qt 5.12.0 or Qt 5.12.1, the timers are fired every 1s even if I specify a smaller interval.

    The following code is supposed to log something every 200ms, but it is executed only once per second (1000ms).

    const intv = setInterval(() => console.log(new Date().getTime()), 200);
    

    The same is true for other timer-related functions (e.g. setTimeout).

    Does anyone know if some kind of throttling has been added to QWebEngine? Or to Chromium?
    Is there any way to disable this restriction?

    Thanks!

    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 Extensions
    • Unsolved