Results 1 to 3 of 3

Thread: QTimer::singleShot in while

  1. #1
    Join Date
    Nov 2019
    Posts
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default QTimer::singleShot in while

    Hello, I have a problem with using QTimer::singleShot. When button is clicked, I would like to start blinking images and stop it with click on another button. Is QTimer right answer or should I used something else??

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QTimer::singleShot in while

    Not QTimer::singleShot but connect QTimer::timeout signal to the images blinking slot and call QTimer::start. After another button call QTimer::stop.

  3. #3
    Join Date
    Nov 2019
    Posts
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QTimer::singleShot in while

    Thank you, now it works perfect.

Similar Threads

  1. QTimer::singleShot(0, ... confusion
    By bjoern83 in forum Qt Programming
    Replies: 5
    Last Post: 9th October 2022, 11:30
  2. QTimer::singleShot stop at 12:00AM on second day
    By croliver in forum Qt Programming
    Replies: 1
    Last Post: 22nd August 2016, 18:37
  3. Replies: 1
    Last Post: 3rd April 2016, 22:39
  4. Replies: 3
    Last Post: 31st January 2010, 17:56
  5. multiple QTimer::singleShot() calls?
    By mattc in forum Qt Programming
    Replies: 1
    Last Post: 27th July 2009, 20:22

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.