Results 1 to 6 of 6

Thread: Qthread n QTimer Problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qthread n QTimer Problem

    Quote Originally Posted by quickNitin
    thanks jacek! i am trying this code. My purpose is while reading from fifo gui shouldn't be blocked and it keep o updating as well. [...] Will not this code will block event loop.
    It won't block the event loop, because it will happen in a different thread.

    Quote Originally Posted by quickNitin
    That ws the reason i was reading elements from fifo one at a time.
    In that case maybe you don't need that timer at all? Maybe a QThread::sleep() will be enough? How often that device will produce data?

  2. #2
    Join Date
    Apr 2006
    Posts
    122
    Thanks
    18
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Qthread n QTimer Problem

    an algo will write points to fifo. Appx every second

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

    Default Re: Qthread n QTimer Problem

    If the thread only reads data, maybe it's enough to do a blocking (temporary) read in the other thread without any need for other sync mechanisms. "waitForReadyRead" may be helpfull here.

Similar Threads

  1. Is it possible to create a QThread without inheriting ?
    By probine in forum Qt Programming
    Replies: 6
    Last Post: 23rd March 2006, 22:51
  2. Replies: 6
    Last Post: 17th March 2006, 17:48
  3. fftw problem
    By lordy in forum General Programming
    Replies: 1
    Last Post: 16th March 2006, 21:36
  4. Replies: 16
    Last Post: 7th March 2006, 15:57
  5. Compilation problem, don't know why
    By yellowmat in forum Newbie
    Replies: 6
    Last Post: 2nd March 2006, 15:36

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
  •  
Qt is a trademark of The Qt Company.