Results 1 to 2 of 2

Thread: How can i terminate a delay / wait condition

  1. #1
    Join Date
    Aug 2010
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How can i terminate a delay / wait condition

    Hello All,

    I would like to know if there is any way to terminate a wait / delay condition.
    I am using QTest::qwait(ms) for adding responsive delay in my code. Now i would like to terminate/break this delay. Something like, QTest::qWait(2000) will start a 2 sec delay, so what should i do to terminate this 2 sec wait time.

    Note: QTimer is not suitable for my code and i am using Qtest:qwait for adding the delay.

    I hope i made the question clear, Any suggestions in this regard would be really helpful.

    Thanks,
    Manoj

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How can i terminate a delay / wait condition

    If you want a delay that's shorter than a predefined amount of time, then don't use qWait() but rather use some other apporach. In other words you are approaching the problem from a wrong end.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    asinghma (23rd February 2011)

Similar Threads

  1. Using an If condition in a QML delegate?
    By technoViking in forum Qt Quick
    Replies: 8
    Last Post: 25th August 2011, 05:26
  2. Replies: 4
    Last Post: 19th December 2010, 06:15
  3. terminate a QThread from GUI
    By OverTheOCean in forum Qt Programming
    Replies: 6
    Last Post: 26th July 2010, 02:12
  4. Replies: 2
    Last Post: 30th June 2010, 10:48
  5. Sleep condition in QT
    By santhoshv84 in forum Qt Programming
    Replies: 1
    Last Post: 18th July 2008, 12:07

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.