Results 1 to 2 of 2

Thread: cost of emitting signal

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

    Default cost of emitting signal

    greetings.
    i am in knowing what will cost of emitting a signal. SomeWhere in one post i read signal-slo connects cost is comaparable to virtaul functions.
    Why i am intersted here is because i want to depending on a condition i want to emit a signal .If checkign a bool cost more than emit then i think there is no point in doing so.

    quickNitin

  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: cost of emitting signal

    Emitting a signal is more expensive than checking a boolean.

    The least you have to do to emit a signal is to find a list of slots connected to them (Qt3 and Qt4), check what thread owns them (Qt4) and call an appropriate method with appropriate arguments (Qt3 and Qt4) or queue the connection as an event after serialising slots' arguments (Qt4).

Similar Threads

  1. Replies: 2
    Last Post: 17th May 2006, 21:01
  2. QSortFilterProxyModel signal and selection confusion
    By pascal123 in forum Qt Programming
    Replies: 1
    Last Post: 1st April 2006, 16:25
  3. no such signal QListBox::currentChanged()
    By jopie bakker in forum Newbie
    Replies: 2
    Last Post: 2nd March 2006, 15:17
  4. send signal from QCombobox
    By raphaelf in forum Qt Programming
    Replies: 22
    Last Post: 28th February 2006, 14:18
  5. No such signal...
    By chaimar in forum Qt Programming
    Replies: 12
    Last Post: 24th January 2006, 22:33

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.