Results 1 to 2 of 2

Thread: collapsing frequent signals into one signal

  1. #1
    Join Date
    Jul 2012
    Posts
    244
    Thanks
    27
    Thanked 15 Times in 14 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default collapsing frequent signals into one signal

    is there any mechanism or best practice for "caching" signals? For example, if
    a system emits 10,000 update() signals within one second, i would like to "cache" all of them into
    one update() signal to prevent clogging.


    certainly i am not the first one to encounter this 'problem'.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: collapsing frequent signals into one signal

    You can use a QTimer with a short interval. Restart on every signal (or if you do that at the emitter before sending the signal), and only execute when the timer runs out.

    Cheers,
    _

Similar Threads

  1. Window with Expanding/Collapsing Table
    By Sarol in forum Newbie
    Replies: 2
    Last Post: 13th December 2011, 15:38
  2. Frequent QTcpSocket reconnect
    By giantdragon in forum Newbie
    Replies: 1
    Last Post: 24th May 2011, 13:06
  3. QGLWidget crashes on frequent updates
    By kkk777kkk in forum Qt Programming
    Replies: 1
    Last Post: 13th September 2010, 10:35
  4. QTreeWidgetItem - widget with layout collapsing
    By enkidu in forum Qt Programming
    Replies: 4
    Last Post: 9th August 2009, 22:50
  5. Is QMap efficient in case of frequent read access ?
    By yellowmat in forum Qt Programming
    Replies: 4
    Last Post: 19th November 2006, 08:20

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.