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. sleep and wait

sleep and wait

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 3 Posters 1.4k 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.
  • E Offline
    E Offline
    elmoterich
    wrote on last edited by
    #1

    Hallo!

    when I use the sleep() or wait() function the following commands are not executed. What can I do for working delay?

    Greetings

    elmoterich

    1 Reply Last reply
    0
    • G Offline
      G Offline
      Gruzzyh2
      wrote on last edited by
      #2

      Hi,

      Do you have an example ?
      What is the condition that breaks your sleep or your wait ?

      Gruz

      1 Reply Last reply
      0
      • Chris KawaC Offline
        Chris KawaC Offline
        Chris Kawa
        Lifetime Qt Champion
        wrote on last edited by
        #3

        sleep and wait are almost never a good choice and great indicators of reckless design. They are blocking functions which means nothing will run on that thread until they timeout.
        If you want to schedule a function run after a specified time you can use QTimer::singleShot.

        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