Results 1 to 3 of 3

Thread: Signals & Slots!

  1. #1
    Join Date
    Apr 2010
    Posts
    152
    Thanks
    5
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Signals & Slots!

    I'm wondering if the signal/slot approach to event handling is gonna be replaced by something that does not require the special pre-processing step? It may be a nice way to handle object events, but at the same time it's pretty limiting when it comes to editing designer generated code. Besides, it makes the code less standard and requires the Qt tools to do this extra step.

    Is there a technical reason for sticking with this approach? Why not use traditional event handling like in other toolkits?

    Will it be out of the way soon in future releases?

    Is it already replaced and I'm not aware of this because I'm a begginer ?

    Thanks.

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Signals & Slots!

    I doubt it'll be going anywhere soon as it offers much more than other methods used in other toolkits.

    Some webpages you might want to read: A wikipedia article! and the qt documentation for signals and slots

  3. #3
    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: Signals & Slots!

    Let's not forget signals & slots mechanism allows for loose coupling of objects whereas regular events require more tight coupling (at least being tightly coupled to the event objects themselves). Signals are also referred to as "semantic events" being more high-level than regular events (i.e. "scrollbar's groove was clicked" vs. "left mouse button was pressed at position [24,42]"). And having MOC around is not a burden, many people don't even know it's there. There are other precompilers or postcompilers involved so one more or less doesn't make a difference. Also thanks to a runtime evaluation of Qt's signals and slots and metaobjects in general they can be safely used across library boundaries and can even be dynamically created (i.e. for D-BUS or COM exposure).

Similar Threads

  1. about signals and slots
    By Sandip in forum Qt Programming
    Replies: 9
    Last Post: 15th July 2008, 16:02
  2. Signals and Slots
    By 83.manish in forum Qt Programming
    Replies: 3
    Last Post: 30th June 2008, 10:31
  3. regarding signals/slots
    By jjbabu in forum Qt Programming
    Replies: 2
    Last Post: 4th October 2007, 09:32
  4. Signals and slots
    By sylvarant in forum Newbie
    Replies: 4
    Last Post: 11th September 2007, 15:48
  5. help with signals and slots
    By superutsav in forum Qt Programming
    Replies: 3
    Last Post: 4th May 2006, 12:49

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.