Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for MCUs
  4. BusyIndicator affecting the timeout value of QTimer
QtWS25 Last Chance

BusyIndicator affecting the timeout value of QTimer

Scheduled Pinned Locked Moved Unsolved Qt for MCUs
qtcppqmlc++busy indicatorqtimerqml
1 Posts 1 Posters 291 Views
  • 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.
  • P Offline
    P Offline
    Pavankumar S V
    wrote on 9 Oct 2023, 08:32 last edited by Pavankumar S V
    #1

    Background: In our embedded QT application(based on ARM processor), there is a Qtimer which will timeout for every 20ms. Updating the user interface objects is done inside the timeout handler of this timer.

    Also, we have a computationally heavy task which I replaced with a "for" loop with some 3000 iterations and print statements inside it for easy understanding. I'm showing BusyIndicator during this operation.

    Issue1: When the BusyIndicator is being shown, the Qtimer which is set for 20ms is getting timeout for every 40+ seconds.(Anyway this is not causing any issue at this point of time because, no UI related operations are done when BusyIndicator is displayed).

    Issue2(Actual Issue): Once the heavy task is completed, the BusyIndicator is disabled. The Qtimer that is fired after disabling BusyIndicator, also takes 40+ sec to timeout for the first time, then it is recovering and firing for every 20ms subsequently. Because of this, as soon as the BusyIndicator is disabled and any valid page is displayed, the UI in that valid page is not responding for those 40+ seconds.

    Questions:

    1. Why BusyIndicator is affecting the Qtimer's timeout value?
    2. Is there any way where the BusyIndicator does not affect the Qtimer timeout value?
    3. Any other solution for the issue that I'm facing?

    Note: I created a dummy project in QtCreator and created a demo Desktop based application(in both Windows and Ubuntu) with the same scenario(i.e QTimer being interrupted for some time by a blocking heavy task), I could not see any issue(QTimer fires immediately after the blocking task is completed). I'm assuming that this issue might be specific to embedded applications.

    Thanks in Advance

    1 Reply Last reply
    0

    1/1

    9 Oct 2023, 08:32

    • Login

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