Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. How can I delay but not time.sleep?
Forum Updated to NodeBB v4.3 + New Features

How can I delay but not time.sleep?

Scheduled Pinned Locked Moved Unsolved Language Bindings
pyqt5
3 Posts 3 Posters 3.2k 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.
  • D Offline
    D Offline
    Dl10
    wrote on last edited by A Former User
    #1

    Hi all,
    I programming on python and
    I do a program white use a Pyqt5.
    How can I delay (style time.sleep(1)) but not time.sleep some anther func.
    I use imports:

    import PyQt5 - All
    import pyglet
    import numpy as np
    import time
    import cv2
    import datetime
    import dateutil  
    

    Plese help. tnx!

    JonBJ T 2 Replies Last reply
    0
    • D Dl10

      Hi all,
      I programming on python and
      I do a program white use a Pyqt5.
      How can I delay (style time.sleep(1)) but not time.sleep some anther func.
      I use imports:

      import PyQt5 - All
      import pyglet
      import numpy as np
      import time
      import cv2
      import datetime
      import dateutil  
      

      Plese help. tnx!

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Dl10 said in time.sleep...:

      how can i delay (style time.sleep(1)) but not time.sleep some anther func.

      Someone else may understand what you mean by this, but I'm afraid I do not... Care to clarify?

      1 Reply Last reply
      0
      • D Dl10

        Hi all,
        I programming on python and
        I do a program white use a Pyqt5.
        How can I delay (style time.sleep(1)) but not time.sleep some anther func.
        I use imports:

        import PyQt5 - All
        import pyglet
        import numpy as np
        import time
        import cv2
        import datetime
        import dateutil  
        

        Plese help. tnx!

        T Offline
        T Offline
        Tirupathi Korla
        wrote on last edited by Tirupathi Korla
        #3

        @Dl10
        You may split the function and start a timer.. something like..
        from :

        testFunction(){
          step1..
          step2..
          time.sleep()..
          step3..
        }
        

        to

        testFunction(){
        step1..
        step2..
        qtimer t;
        connect(&t,SIGNAL(timeOut()),this,SLOT(testFunction2()));
        t.start(2000);
        }
        testFunction2(){
        step3...
        }
        

        PS: Syntax may vary.. this is a c++ code.. please convert it to pyqt5.. Hope this is what you are expecting...
        and thats what i understood from your post...

        1 Reply Last reply
        2

        • Login

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