Results 1 to 2 of 2

Thread: Is it safe to call QTimer::start() before QTimer::moveToThread()?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2009
    Location
    Italy
    Posts
    70
    Thanks
    23
    Thanked 15 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Is it safe to call QTimer::start() before QTimer::moveToThread()?

    Hello,
    is the following code safe?

    Qt Code:
    1. timer->start(interval);
    2. timer->moveToThread(other_thread);
    To copy to clipboard, switch view to plain text mode 

    I am afraid that calling moveToThread() after start() might be unsafe, even though it seems to work as expected (so far).

    Thanks
    Last edited by mattc; 25th October 2012 at 18:53.

Similar Threads

  1. Replies: 15
    Last Post: 4th August 2012, 19:11
  2. QMovie::moveToThread() and its QTimer
    By tiftof in forum Qt Programming
    Replies: 3
    Last Post: 24th February 2011, 10:53
  3. Replies: 2
    Last Post: 11th February 2011, 19:48
  4. QTimer don't start
    By Qn00b in forum Qt Programming
    Replies: 13
    Last Post: 7th February 2011, 23:02
  5. Replies: 8
    Last Post: 10th December 2009, 10:06

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.